-
[CLOSED][2.2.1] parseDate("9999-99-99")
[CLOSED][2.2.1] parseDate("9999-99-99")
Hi, I did following codes:
Date.parseDate("9999-99-99", "Y-m-d")
and output is : Thu Jun 07 10007 00:00:00 GMT+0800 (Malay Peninsula Standard Time)
I'm not sure is it designed in this way, but I actually expect it returns me error message which indicates that this date is invalid.
Can someone confirmed to me whether it is a bug? If not, may I know the reasons for it to behave this way?
-
Sencha - Community Support Team
This is not a bug. The date roll-over is by design.
In Ext 3 parseDate has a third parameter (strict) that you can set to true to return 'null' for invalid dates.
-
I see. Thank you very much for the replies. 
-
Sencha - Community Support Team
the strict option is also available in 2.3.0.
-
Thanks mystix, but too bad we are using version 2.2.1. 
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us