Opened 9 years ago

Closed 9 years ago

Last modified 7 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:

Description

Due to leap year some days were skipped. The date mechanism does not account for that. See this site for days lost; http://www.henk-reints.nl/cal/gregcal.htm

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 9 years ago.
date picker source to illustrate bug.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by wgoldman

Attachment: myTest.html added

date picker source to illustrate bug.

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

Component: ui.coreui.datepicker

comment:2 Changed 9 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 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.