diff options
author | Mark Wielaard <mark@klomp.org> | 2006-07-30 20:42:42 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2006-07-30 20:42:42 +0000 |
commit | 79344ac399c2d7c0faa37cb164ea9f92e46146c2 (patch) | |
tree | 6af3def04ed69584b0b4e1303ef043d0b13ac5f0 | |
parent | 8c3def8a78c388a3100089d5e768309683e333d6 (diff) | |
download | classpath-79344ac399c2d7c0faa37cb164ea9f92e46146c2.tar.gz |
* java/util/GregorianCalendar.java (maximums): Months can have up to
6 weeks.
(nonLeniencyCheck): weeks is either 5 or 6.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | java/util/GregorianCalendar.java | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2006-07-30 Mark Wielaard <mark@klomp.org> + + * java/util/GregorianCalendar.java (maximums): Months can have up to + 6 weeks. + (nonLeniencyCheck): weeks is either 5 or 6. + 2006-07-29 Mark Wielaard <mark@klomp.org> * javax/swing/JComponent.java (paintingDoubleBuffered): Renamed diff --git a/java/util/GregorianCalendar.java b/java/util/GregorianCalendar.java index 5ce053a37..83ac00e77 100644 --- a/java/util/GregorianCalendar.java +++ b/java/util/GregorianCalendar.java @@ -445,7 +445,7 @@ public class GregorianCalendar extends Calendar if (isSet[WEEK_OF_MONTH]) { - int weeks = (month == 1 && leap == 0) ? 4 : 5; + int weeks = (month == 1 && leap == 0) ? 5 : 6; if (fields[WEEK_OF_MONTH] < 1 || fields[WEEK_OF_MONTH] > weeks) throw new IllegalArgumentException("Illegal WEEK_OF_MONTH."); } @@ -1164,7 +1164,7 @@ public class GregorianCalendar extends Calendar */ private static final int[] maximums = { - AD, 5000000, 11, 53, 5, 31, 366, + AD, 5000000, 11, 53, 6, 31, 366, SATURDAY, 5, PM, 12, 23, 59, 59, 999, +(12 * 60 * 60 * 1000), (12 * 60 * 60 * 1000) |