Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#5550 closed bug (wontfix)

Day is wrong prior to 10/15/1582

Reported by: wgoldman Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.8
Keywords: Cc:
Blocked by: Blocking:


Due to leap year some days were skipped. The date mechanism does not account for that. See this site for days lost;

Basically Oct. 5 thru Oct. 14, 1582 were skipped. We went from Thursday October 4, 1582 to Friday October 15, 1582. However your calendar shows October 4 as a Monday. I have attached an implementation that illustrates this. Also follows is how java handles it (it is a little better).

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); try {

System.out.println(sdf.parse("1582-10-04")); System.out.println(sdf.parse("1582-10-05")); System.out.println(sdf.parse("1582-10-06")); System.out.println(sdf.parse("1582-10-07")); System.out.println(sdf.parse("1582-10-15"));

/* produces

  • Thu Oct 04 00:00:00 CST 1582
  • Fri Oct 15 00:00:00 CST 1582
  • Sat Oct 16 00:00:00 CST 1582
  • Sun Oct 17 00:00:00 CST 1582
  • Fri Oct 15 00:00:00 CST 1582 */

} catch (ParseException e) {

TODO Auto-generated catch block e.printStackTrace();


Attachments (1)

myTest.html (957 bytes) - added by wgoldman 13 years ago.
date picker source to illustrate bug.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by wgoldman

Attachment: myTest.html added

date picker source to illustrate bug.

comment:1 Changed 13 years ago by Jörn Zaefferer

Component: ui.coreui.datepicker

comment:2 Changed 13 years ago by kbwood

Resolution: wontfix
Status: newclosed

JavaScript uses the proleptic Gregorian calendar which extends the current Gregorian calendar back to dates before its introduction. Hence it does not take account of the missing days in 1582.

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.