1

I'm looking for a javascript library that's capable of parsing dates in the same way that C#'s Datetime.Parse() function does. I'm looking for something that is:

  • Reliable: It needs to be suitable for use in a production environment. So no bugs
  • Support the European/Australian date format (dd/mm/yyyy). It should possess an option to interpret the first digits as the days part instead of the months part, as is the case in the USA.
  • Parse without requiring a format specifier. I want to be able to throw any "reasonable" input at it and expect it to work. E.g. "1/6/2011", "1-6-2011", "7/4/11" (interpret as 2011 as that's the century we're in), "1 March 2011", "1 Oct 2011", "Oct 1 2011", etc
  • It should not attempt to guess when given bad input. "45 july 2012" should fail the validation rather than parse as mid-august.

So basically I just need something that makes date parsing on the front end as trivial is it is on the backend using dot.net.

0

3 Answers 3

1

datejs is the best JS library i have ever used for date manipulation. Check date.js here . Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

0

I don't know if it meets all of the requirements that you've listed, but a very strong contender is http://www.datejs.com/

Comments

0

You could also try this one:

http://depressedpress.com/javascript-extensions/dp_dateextensions/

Good luck!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.