Results 1 to 5 of 5

Thread: [CLOSED][2.2.1] parseDate("9999-99-99")

  1. #1
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
      0  

    Default [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?

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    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.

  3. #3
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
      0  

    Default

    I see. Thank you very much for the replies.

  4. #4
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
      0  

    Default

    the strict option is also available in 2.3.0.

  5. #5
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
      0  

    Default

    Thanks mystix, but too bad we are using version 2.2.1.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •