#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)
Change History (4)
Changed 13 years ago by
Attachment: | myTest.html added |
---|
comment:1 Changed 13 years ago by
Component: | ui.core → ui.datepicker |
---|
comment:2 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
date picker source to illustrate bug.