Opened 12 years ago
Closed 11 years ago
#9281 closed defect (fixed)
dojo.date.stamp.fromISOString fails for "0001-01T00:00:00"
Reported by: | erin.stanfill | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Date | Version: | 1.3.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
dojo.date.stamp.fromISOString("0001-01-01T00:00:00")
returns a data object with the year set to 1901 instead of 0001. My application is communicating with a server written in .net and this is the string representation of DateTime.MinValue
in .net.
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
seems like we could put this in a conditional and not pay much penalty for the common case, just add a bit more bloat to the method.
comment:3 Changed 11 years ago by
Milestone: | tbd → 1.4 |
---|---|
Priority: | normal → high |
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The limitation is noted in the inline documentation -- see summary for fromISOString.
This was discovered a while back (see r12561) There's a commented out line in stamp.js that will solve the problem. Look around line 64:
Problem is, this impacts performance. We were trying to keep this method very fast and didn't have a real use case for why someone would need support for "year 1". It sounds like we'll have to consider. There's the workaround, in the meantime.