diff options
author | Tom Tromey <tromey@cygnus.com> | 1999-04-26 15:34:44 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-04-26 15:34:44 +0000 |
commit | 3cc26081445329aec4d4711d69c0d86e05af841b (patch) | |
tree | a49553afea7d22437a2921c9b7915e6152eb4206 /libjava/java/util | |
parent | d5d9a8b6c3dce9425129aa7ee9bd5ab69ae27c2a (diff) | |
download | gcc-3cc26081445329aec4d4711d69c0d86e05af841b.zip gcc-3cc26081445329aec4d4711d69c0d86e05af841b.tar.gz gcc-3cc26081445329aec4d4711d69c0d86e05af841b.tar.bz2 |
GregorianCalendar.java (setDefaultTime): New method.
* java/util/GregorianCalendar.java (setDefaultTime): New method.
(GregorianCalendar): Use it in all constructors.
* java/util/Calendar.java (Calendar): Changed argument name to
`zone' to match code.
* gnu/gcj/text/LocaleData_en.java: Added collatorRule element.
* java/text/CollationKey.java: New file.
* java/text/CollationElementIterator.java: New file.
* java/text/Collator.java: New file.
* java/text/RuleBasedCollator.java: New file.
From-SVN: r26654
Diffstat (limited to 'libjava/java/util')
-rw-r--r-- | libjava/java/util/Calendar.java | 2 | ||||
-rw-r--r-- | libjava/java/util/GregorianCalendar.java | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libjava/java/util/Calendar.java b/libjava/java/util/Calendar.java index 8649adf..f4806a3 100644 --- a/libjava/java/util/Calendar.java +++ b/libjava/java/util/Calendar.java @@ -88,7 +88,7 @@ public abstract class Calendar implements java.io.Serializable, Cloneable this (null, null); } - protected Calendar (TimeZone tx, Locale loc) + protected Calendar (TimeZone zone, Locale loc) { fields = new int[FIELD_COUNT]; isSet = new boolean[FIELD_COUNT]; diff --git a/libjava/java/util/GregorianCalendar.java b/libjava/java/util/GregorianCalendar.java index d20c06e..26a9814 100644 --- a/libjava/java/util/GregorianCalendar.java +++ b/libjava/java/util/GregorianCalendar.java @@ -107,11 +107,13 @@ public class GregorianCalendar extends Calendar { public GregorianCalendar (TimeZone zone, Locale locale) { super (zone, locale); + setDefaultTime (); } public GregorianCalendar (int year, int month, int date) { this((TimeZone) null); + setDefaultTime (); set (year, month, date); } @@ -119,6 +121,7 @@ public class GregorianCalendar extends Calendar { int hour, int minute) { this((TimeZone) null); + setDefaultTime (); set (year, month, date, hour, minute); } @@ -126,9 +129,15 @@ public class GregorianCalendar extends Calendar { int hour, int minute, int second) { this((TimeZone) null); + setDefaultTime (); set (year, month, date, hour, minute, second); } + private final void setDefaultTime () + { + setTimeInMillis (System.currentTimeMillis()); + } + public int getMinimum(int calfield) { return mins[calfield]; } public int getGreatestMinimum(int calfield) { return mins[calfield]; } public int getMaximum(int calfield) { return maxs[calfield]; } |