I think that you are right - MONTH is 0-11 and DAY_OF_MONTH is 1-31 while DAY_OF_WEEK is 1-7 and DAY_OF_YEAR is 1-366 While this is odd, I think you should ask the developers at Sun why MONTH is 0 based while the others are 1 based...
>>> [EMAIL PROTECTED] 11/30/01 9:27:52 AM >>> Hi! I think that the Calendar object behaves strange. <% String[] ids = TimeZone.getAvailableIDs(1 * 60 * 60 * 1000); SimpleTimeZone pdt = new SimpleTimeZone(1 * 60 * 60 * 1000, ids[0]); pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 1 * 60 * 60 * 1000); pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 1 * 60 * 60 * 1000); GregorianCalendar MyDate = new GregorianCalendar(pdt); out.print(MyDate.get(Calendar.YEAR) + "-" + MyDate.getMinimum(Calendar.MONTH) + "-" + MyDate.getMinimum(Calendar.DATE); %> My output is : 2001-0-1 Is it so that months start a 0 and dates starts at 1????? weird in that case. Why does not both month and date starts at 0 or 1. That would have been much more simple.. -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]> -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
