Search and Top Navigation
#5550 closed bug (wontfix)
Opened April 26, 2010 04:33PM UTC
Closed August 24, 2010 05:29AM UTC
Last modified October 11, 2012 09:15PM UTC
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 (3)
Changed July 30, 2010 11:37AM UTC by comment:1
component: | ui.core → ui.datepicker |
---|
Changed August 24, 2010 05:29AM UTC by comment:2
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.
Changed October 11, 2012 09:15PM UTC by comment:3
milestone: | TBD |
---|
Milestone TBD deleted