Opened 8 years ago

Closed 8 years ago

#12821 closed defect (invalid)

dojo.date.isLeapYear is wrong for 1900

Reported by: Douglas Hays Owned by: Adam Peller
Priority: high Milestone: tbd
Component: Date Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Douglas Hays)

isLeapYear returns true for 1900 but it's not a leap year. I tried the following code and it seems to work:

return !(year%4) && (!!(year%100) || !(year%400));

This is easily seen with the new date picker spinning wheels in dojox/mobile.

Change History (2)

comment:1 Changed 8 years ago by Douglas Hays

Description: modified (diff)

comment:2 Changed 8 years ago by Douglas Hays

Resolution: invalid
Status: newclosed

SpinWheel? problem. isLeapyear seems OK

Note: See TracTickets for help on using tickets.