Fix prevMonthLength

X-SVN-Rev: 2820
This commit is contained in:
Alan Liu 2000-10-27 20:55:52 +00:00
parent 060d086210
commit ab5c42e298
2 changed files with 2 additions and 2 deletions

View File

@ -1912,7 +1912,7 @@ public class GregorianCalendar extends Calendar {
* January), the day value will be ignored. * January), the day value will be ignored.
*/ */
private final int prevMonthLength(int month) { private final int prevMonthLength(int month) {
return (month > 1) ? monthLength(month - 1) : 31; return (month > 0) ? monthLength(month - 1) : 31;
} }
private final int yearLength(int year) { private final int yearLength(int year) {

View File

@ -1912,7 +1912,7 @@ public class GregorianCalendar extends Calendar {
* January), the day value will be ignored. * January), the day value will be ignored.
*/ */
private final int prevMonthLength(int month) { private final int prevMonthLength(int month) {
return (month > 1) ? monthLength(month - 1) : 31; return (month > 0) ? monthLength(month - 1) : 31;
} }
private final int yearLength(int year) { private final int yearLength(int year) {