Opened 13 years ago
Closed 13 years ago
#5680 closed defect (fixed)
date parse uses default 1972, fromISOString uses 1970
Reported by: | Douglas Hays | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | Date | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Running dijit/form/test_timetextbox.html, the first textbox displays 5:45pm. Click this value to display the popup and then click outside the box to cancel. You see the onChange fires even though the value is unchanged. This is because the date object returned by the parser's fromISOstring() invocation has a year of 1970, but the date object returned by parse() inside the widget is 1972, and thus the dates differ. Attached is a patch to locale.js to make the default year = 1970 to be consistent with other date implementations. The defaults should also be documented somewhere.
Attachments (1)
Change History (3)
comment:1 Changed 13 years ago by
Summary: | date parse uses default 1972, fromISOString uses 170 → date parse uses default 1972, fromISOString uses 1970 |
---|
Changed 13 years ago by
Attachment: | 5680.patch added |
---|
comment:2 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
code patch to locale.js to use 1970