>>>>> "Gansha" == Wu, Gansha <[EMAIL PROTECTED]> writes:
Gansha> [ from GregorianCalendar.java ]
Gansha> if (weekday <= 0) <- notice here.
Gansha> weekday += 7; <- notice here.
This code is correct. Calendar defines SUNDAY==1.
Gansha> - return cal.get(Calendar.DAY_OF_WEEK);
Gansha> + int day = cal.get(Calendar.DAY_OF_WEEK);
Gansha> + return day == 7?0:day;
I think the correct fix is to use this:
return cal.get(Calendar.DAY_OF_WEEK) - 1;
Date defines the days starting at 0, while Calendar defines them
starting at 1.
I'm going to check this in.
Tom
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath