aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/Calendar.java
AgeCommit message (Collapse)AuthorFilesLines
2001-07-26Calendar.java (set): Never recompute fields here.Bryce McKinlay1-5/+0
* java/util/Calendar.java (set): Never recompute fields here. They will already be set if someone set time explicitly, and it can cause problems to do so. Don't invalidate AM_PM setting if HOUR is set. * java/util/GregorianCalendar.java (computeTime): Don't ignore an HOUR setting if AM_PM is set. Don't try to ensure the HOUR value is sane. * java/text/SimpleDateFormat.java (defaultCentury): New field. (readObject): Call set2DigitYearStart if appropriate so that defaultCentury is calculated. (SimpleDateFormat): Don't bother clearing calendar here. Call computeCenturyStart(). (set2DigitYearStart): Calculate and set defaultCentury. (format): Don't clone the calendar. Use "calendar" not "theCalendar" everywhere. (parse): Likewise. If the pattern is "y" or "yy" and it found exactly 2 numeric digits, use the 80-20 heuristic to parse the value into a default century based on defaultCenturyStart. (computeCenturyStart): Rewritten. Call set2DigitYearStart(). From-SVN: r44395
2001-05-10[multiple changes]Tom Tromey1-14/+51
2001-05-10 Tom Tromey <tromey@redhat.com> * java/util/GregorianCalendar.java: Imported from Classpath. * gnu/java/locale/LocaleInformation_nl.java: New file from Classpath. * gnu/java/locale/LocaleInformation_en.java: Likewise. * gnu/java/locale/LocaleInformation_de.java: Likewise. * gnu/java/locale/LocaleInformation.java: Likewise. * natGregorianCalendar.cc: Removed. * Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Removed natGregorianCalendar.cc. 2001-05-10 Tom Tromey <tromey@redhat.com> * java/text/SimpleDateFormat.java (computeCenturyStart): New method. (defaultCenturyStart): Use it. (readObject): Likewise. (SimpleDateFormat): Clear the calendar. Set the grouping on the number format. (parse): Copy the calendar before modifying it. Correctly handle the time zone. * java/util/Calendar.java (clear): Set field value(s) to 0. 2001-05-10 Jeff Sturm <jsturm@one-point.com> * Calendar.java (get): Clear areFieldsSet if requested field is not set. (set): Unset fields that depend on new value. From-SVN: r41942
2000-12-28re PR libgcj/1358 (java.util.Date.toString() doesn't seem to behave properly.)Warren Levy1-3/+3
Fix for PR libgcj/1358: * java/lang/System.java: Update Copyright date properly. * java/util/Calendar.java: Fix typo in comment. (set): Set 24-hour clock hour instead of 12-hour clock hour. * java/util/GregorianCalendar.java (GregorianCalendar): Properly initialize times. Spec says to set H:M:S values to zero only if a date is given. * java/util/TimeZone.java (getDefaultDisplayName): Casts to char needed for evaluating numbers '0' to '9' in printouts of GMT offsets. * java/util/natGregorianCalendar.cc (computeTime): Properly handle timezones and GMT offsets, being careful to account for units of milliseconds vs. seconds. From-SVN: r38508
2000-10-27Makefile.am: Added locale files from Classpath.Warren Levy1-175/+879
* Makefile.am: Added locale files from Classpath. * Makefile.in: Rebuilt. * gnu/java/locale/Calendar.java: New file. * gnu/java/locale/Calendar_de.java: New file. * gnu/java/locale/Calendar_en.java: New file. * gnu/java/locale/Calendar_nl.java: New file. * java/lang/ClassNotFoundException.java: Replaced with Classpath file. * java/math/BigDecimal.java (intVal): Renamed from 'num' for serialization compatibility. (scale): Made private. (serialVersionUID): New field. * java/math/BigInteger.java (ival): Made transient. (words): Made transient. (bitCount): New serialization field. (bitLength): Ditto. (firstNonzeroByteNum): Ditto. (lowestSetBit): Ditto. (magnitude): Ditto. (signum): Ditto. (serialVersionUID): New field. (readObject): New method. (writeObject): New method. * java/util/BitSet.java (serialVersionUID): New field. * java/util/Calendar.java: Replaced with Classpath file. * java/util/GregorianCalendar.java (GregorianCalendar): Pass result of getDefault() for TimeZone or Locale instead of passing nulls. * java/util/Locale.java (serialVersionUID): New field. (writeObject): New method. (readObject): New method. * java/util/SimpleTimeZone.java: Replaced with Classpath file. Serialization mods. From-SVN: r37080
2000-03-07All files: Updated copyright information.Tom Tromey1-1/+1
* All files: Updated copyright information. * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. From-SVN: r32387
2000-02-03Calendar.java (toString): New method.Tom Tromey1-1/+16
* java/util/Calendar.java (toString): New method. * java/util/SimpleTimeZone.java (clone): New method. (toString): New method. * java/util/TimeZone.java (clone): New method. * java/text/SimpleDateFormat.java (clone): New method. * java/text/NumberFormat.java (clone): New method. (equals): New method. * java/text/Format.java (clone): New method. * java/text/DateFormatSymbols.java (DateFormatSymbols): New constructor. (clone): New method. * java/text/DateFormat.java (clone): New method. * java/text/Collator.java (clone): New method. From-SVN: r31775
2000-01-19* All files: Updated copyright to reflect Cygnus purchase.Tom Tromey1-1/+1
From-SVN: r31504
1999-05-12Calendar.java (set): First call computeFields if needed.Per Bothner1-0/+1
x * java/util/Calendar.java (set): First call computeFields if needed. * java/util/natGregorianCalendar.cc (computeTime): Cast 1000 to jlong. From-SVN: r26910
1999-04-26GregorianCalendar.java (setDefaultTime): New method.Tom Tromey1-1/+1
* 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
1999-04-07Initial revisionTom Tromey1-0/+258
From-SVN: r26263