from : 5/19/2011
to : 2011-05-19
I need it to raise an error when it finds that it cannot be real like 5/40/2011 etc. Are there any libraries that do it well?
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.
How about Datejs an open source date library? Specifically:
http://code.google.com/p/datejs/wiki/APIDocumentation#parseExact
Return Value
{Date} A Date object or null if the string cannot be converted into a Date.
or
http://code.google.com/p/datejs/wiki/APIDocumentation#validateDay
Return Value
{Boolean} true if within range, otherwise false.