I’m using date-fr-FR.js
When I’m doing this
Date.parse("5 juillet 2012")
it’s returning null
But when I do this
Date.parse("5 juil. 2012")
it’s returning the right date, someone have an idea ?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looking at the source for fr-FR.js (r191) which is used to build date-fr-FR.js, there seems to be is a mistake in the regular expressions that are used to determine the months, for that particular month it reads:
which means it’ll work with
Date.parse("5 juilXlet 2012"),Date.parse("5 juil 2012")andDate.parse("5 juil. 2012")but not withDate.parse("5 juillet 2012")!I think it should be something like this:
Not that that will be of any help to you! I suggest you just always use the short names unless you can get that file fixed.