In the Date and Calendar classes the month is defined to be in the interval [0..11], not [1..12] as it in the real world. So month 8 is September, not August.
why is only the month 0 based?
Because it would be very confusing to redefine days or years (which are numbers) to use different ones. Months at least have a non-numerical designation (i.e., a name) which is unique. Of course, it is still very confusing. Another explanation would be that Java array indices start at 0, and the names of months are stored in an array internally somewhere, so a Sun developer who wrote these classes got a bit lazy, and/or thought that it makes sense this way. [ September 13, 2005: Message edited by: Ulf Dittmer ]
subject: I can't seem to get gredorian calender working right