tags:

views:

19

answers:

1

I need to do date validation for international date formats. The utility should pass following date formats

12 November 2009
12-november-2009
12-nov-2009
12-novembber-2009

Note that the last one has spelling error. However one needs to look at only three letters 'nov' to identify that it is November. I was wondering it there is a JavaScript date helper utility out there for me to get started with.

+2  A: 

Try DateJS library, but for spelling error, I think it can't help it.

S.Mark
DateJS looks awesome. It also handles 12-nov-2009. It means I can pass only the first three character of the month to this util and it will work.
Roger
...assuming all misspellings are after the three first letters of course.
Niklas
@Niklas. you are right. If there is a misspelling in the first three chracters then I can't figure out what month user had in mind. However I find that from the user experience point of view if there is a spelling error after the first three letters then there is no need to ask user to correct the spelling.
Roger