kashifaltaf / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

Date.parseExact returns (in)valid date when month is 0 #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. FireBug Command Line:
>>> Date.parseExact("01.00.2010","dd.MM.yyyy");

What is the expected output? What do you see instead?
Expected: null
Instead: Tue Dec 01 2009 00:00:00 GMT+0100 (Central Europe Standard Time) { 
_orient=1, more...}

What version of the product are you using? On what operating system?
 date-sl-SI.js
 * @version: 1.0 Alpha-1
 * @date: 2008-05-13
 Windows XP Pro SP3, firefox, chrome, IE, opera

Please provide any additional information below.

parseExact should return null if a string cannot be converted to a valid date 
and as such acts as a first line of defense againt incorrect data entry.

Original issue reported on code.google.com by ales.vau...@gmail.com on 15 Aug 2010 at 9:05

GoogleCodeExporter commented 8 years ago
fixed on my fork: https://github.com/abritinthebay/datejs/

Original comment by darkcr...@gmail.com on 19 Sep 2013 at 9:57