Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#11332 closed defect (fixed) does not parse 30/31 day of the month in ddMMMyyyy pattern

Reported by: echtykov Owned by: Adam Peller
Priority: high Milestone: 1.5
Component: Date Version: 1.4.3
Keywords: Cc:
Blocked By: Blocking:


The following will return null or undefined:"30Aug2006",{datePattern:"ddMMMyyyy",selector: "date",locale: "en"});

while the following is parsed correctly:"29Aug2006",{datePattern:"ddMMMyyyy",selector: "date",locale: "en"});

The problem is in the regular expression that is getting built up in

I would suggest the following fix:

--- dojo/date/locale.js   (revision *****)
+++ dojo/date/locale.js   (working copy)
@@ -517,7 +517,7 @@
                                s = p2+'[1-9]|'+p3+'[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]';
                        case 'd':
-                               s = '[12]\\d|'+p2+'[1-9]|3[01]';
+                               s = '3[01]|[12]\\d|'+p2+'[1-9]';
                        case 'w':
                                s = p2+'[1-9]|[1-4][0-9]|5[0-3]';

Change History (5)

comment:1 Changed 12 years ago by echtykov

This is similar to the ticket #6242.

comment:2 Changed 12 years ago by Adam Peller

Milestone: tbd1.5.1

comment:3 Changed 12 years ago by Adam Peller


comment:4 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: newclosed

comment:5 Changed 12 years ago by bill

For future reference, was fixed in [22338].

Note: See TracTickets for help on using tickets.