I have a web site which, depending on the location, allows to set the date in different language:
Example:
Mercredi, Juin 06, 2012 // french
Wednesday, Jun 06, 2012 // english
Then these dates needs to be saved on the server using momentjs
moment('Tuesday, Jun 05, 2012').format(); // 2012-06-05T00:00:00+02:00
moment('Mercredi, Juin 06, 2012').format(); // NaN-NaN-NaNTNaN:NaN:NaN+00:00
How can I fix this issue when the user is using a different language from the english?
P.S.:
Not sure if it can helps...
with momentsjs is possible to set the lang in this way, but the problem persists:
moment.lang('fr');
moment('Mercredi, Juin 06, 2012').format(); // NaN-NaN-NaNTNaN:NaN:NaN+00:00