Commit Graph

15 Commits

Author SHA1 Message Date
Mark Wielaard 92aaa24628 Add license clarification.
From-SVN: r49104
2002-01-22 22:40:42 +00:00
Tom Tromey a1f4e5ed0a SimpleDateFormat.java: Re-merged with Classpath.
* java/text/SimpleDateFormat.java: Re-merged with Classpath.
	* gnu/gcj/text/LocaleData.java, gnu/gcj/text/LocaleData_en.java,
	gnu/gcj/text/LocaleData_en_US.java: Removed.
	* java/text/DateFormatSymbols.java (clone): Use Classpath
	implementation.
	(equals): Simplified.
	(DateFormatSymbols): Look in gnu.java.locale for information.
	(DateFormatSymbols(DateFormatSymbols)): Removed.
	(safeGetResource): Removed.
	(DateFormatSymbols): Throws MissingResourceException.
	(ampmsDefault, erasDefault, localPatternCharsDefault,
	monthsDefault, shortMonthsDefault, shortWeekdaysDefault,
	weekdaysDefault, zoneStringsDefault): Removed.
	* java/text/Collator.java (getAvailableLocales): Use modified
	Classpath implementation.
	(getInstance): Look in gnu.java.locale for information.
	(clone): Rewrote.
	* java/text/MessageFormat.java: Reindented.
	(clone): Rewrote.
	* java/text/FieldPosition.java: Merged with Classpath.
	* java/text/ParsePosition.java: Merged with Classpath.
	* java/text/Format.java: Merged with Classpath.
	* java/text/StringCharacterIterator.java
	(StringCharacterIterator(StringCharacterIterator,int,int)): New
	constructor from Classpath.
	* java/text/Annotation.java,
	java/text/AttributedCharacterIterator.java,
	java/text/AttributedString.java,
	java/text/AttributedStringIterator.java: New from Classpath.
	* java/text/CharacterIterator.java: Copied from Classpath.
	* java/text/ChoiceFormat.java: Reindented.
	(clone): Removed.
	* gnu/java/text/BaseBreakIterator.java,
	gnu/java/text/CharacterBreakIterator.java,
	gnu/java/text/LineBreakIterator.java,
	gnu/java/text/LocaleData_en.java,
	gnu/java/text/LocaleData_en_US.java,
	gnu/java/text/SentenceBreakIterator.java,
	gnu/java/text/WordBreakIterator.java: Renamed from gnu/gcj/text/*.
	* gnu/gcj/text/BaseBreakIterator.java (last): Advance past final
	character.
	* java/text/BreakIterator.java (getAvailableLocales): Use
	Classpath implementation.
	(getInstance): Look in gnu.java.locale for information.
	(getCharacterInstance, getLineInstance, getSentenceInstance,
	getWordInstance): Look in gnu.java.text for implementations.
	* java/text/DecimalFormatSymbols.java: Reindented
	(clone): Use Classpath implementation.
	(DecimalFormatSymbols(DecimalFormatSymbols)): Removed.
	(DecimalFormatSymbols(Locale)): Look in gnu.java.locale for
	information.
	* java/text/DateFormat.java: Merged with Classpath.
	(getAvailableLocales): Use Classpath implementation.
	(format(Object,StringBuffer,FieldPosition)): Minor cleanup.
	(computeInstance): Look in gnu.java.locale for information.
	* java/text/NumberFormat.java: Reindented.
	(computeInstance): Look in gnu.java.locale for information.
	(getAvailableLocales): Use implementation from Classpath.
	(setMaximumIntegerDigits): Likewise.
	(setMinimumIntegerDigits): Likewise.
	(setMaximumFractionDigits): Likewise.
	(clone): Removed.
	* java/text/DecimalFormat.java: Reindented.
	* gnu/java/locale/LocaleInformation_en.java: Copied from Classpath.
	* gnu/java/locale/LocaleInformation_en_US.java: Copied from Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added all new files.
	(ordinary_java_source_files): Renamed or removed gnu/gcj/text/*.
	* java/security/spec/AlgorithmParameterSpec.java,
	java/security/spec/KeySpec.java: Re-merged with Classpath.

From-SVN: r45390
2001-09-05 00:00:55 +00:00
Bryce McKinlay fa397ddafb Calendar.java (set): Never recompute fields here.
* 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-07-26 12:21:45 +01:00
Tom Tromey 26ec4f47ba SimpleDateFormat.java (parse): Handle non-dst time zones.
* java/text/SimpleDateFormat.java (parse): Handle non-dst time
	zones.

From-SVN: r42156
2001-05-16 15:34:46 +00:00
Tom Tromey 127699902e SimpleDateFormat.java (parse): Clear DST_OFFSET and ZONE_OFFSET just before computing the time.
* java/text/SimpleDateFormat.java (parse): Clear DST_OFFSET and
	ZONE_OFFSET just before computing the time.

From-SVN: r42076
2001-05-14 17:40:29 +00:00
Tom Tromey 9622762678 [multiple changes]
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
2001-05-10 18:13:17 +00:00
Warren Levy a6f5b6f958 natSystem.cc (getSystemTimeZone): Adjust for DST.
* java/lang/natSystem.cc (getSystemTimeZone): Adjust for DST.
	* java/text/SimpleDateFormat.java
	(indexInArray): Removed private method.
	(processYear): Removed private method.
	(parseLenient): Removed private method.
	(parseLeadingZeros): Removed private method.
	(parseStrict): Removed private method.
	(expect): Added new private method.
	(parse): Reverted to pre-Classpath merge version with minor fixes.
	* java/util/natGregorianCalendar.cc (computeTime): Handle strict
	calendars.

From-SVN: r41456
2001-04-20 09:43:52 +00:00
Warren Levy 1aa605c814 SimpleDateFormat.java (format): Compute hour for cases HOUR_OF_DAY1_FIELD (1-24)...
* java/text/SimpleDateFormat.java (format): Compute hour for cases
	HOUR_OF_DAY1_FIELD (1-24), HOUR1_FIELD (1-12), and HOUR0_FIELD (0-11)
	correctly.  Adjust properly from 0-23 clock hour.

Fixes failure in Mauve test java.text.SimpleDateFormat.Test (format).

From-SVN: r39147
2001-01-20 00:37:09 +00:00
Warren Levy 1326d0c47d DateFormatSymbols.java (zoneStringsDefault): Added more time zone entries.
* java/text/DateFormatSymbols.java (zoneStringsDefault): Added
	more time zone entries.
	* java/text/SimpleDateFormat.java (format): Added case for
	TIMEZONE_FIELD.

From-SVN: r37824
2000-11-28 20:11:46 +00:00
Warren Levy a22add7268 Makefile.am: Added natTimeZone.cc.
* Makefile.am: Added natTimeZone.cc.
	* Makefile.in: Rebuilt.
	* gnu/gcj/text/LocaleData_en.java: Added DateFormat entries.
	* java/text/DateFormatSymbols.java (ampms): Made package private.
	(eras): Made package private.
	(months): Made package private.
	(shortMonths): Made package private.
	(shortWeekdays): Made package private.
	(weekdays): Made package private.
	(formatPrefixes): New private field.
	(localPatternCharsDefault): Made private.
	(dateFormats): New package private field.
	(timeFormats): New package private field.
	(formatsForKey): New private method.
	(DateFormatSymbols(Locale)): Set dateFormats and timeFormats.
	(DateFormatSymbols(DateFormatSymbols)): Ditto.
	* java/text/SimpleDateFormat.java: Merged with Classpath.
	* java/util/TimeZone.java: Merged with Classpath.
	* java/util/natTimeZone.cc: New file.

From-SVN: r37808
2000-11-28 03:09:22 +00:00
Warren Levy 01ce962b94 LocaleData_en.java (monetarySeparator): Added.
* gnu/gcj/text/LocaleData_en.java (monetarySeparator): Added.
	* java/sql/Date.java (serialVersionUID): New field.
	* java/sql/Time.java (serialVersionUID): New field.
	* java/sql/Timestamp.java (serialVersionUID): New field.
	* java/text/ChoiceFormat.java (serialVersionUID): New field.
	* java/text/DateFormat.java (getDateTimeInstance (int)): Removed.
	* java/text/DateFormatSymbols.java (serialVersionUID): New field.
	* java/text/DecimalFormat.java (serialVersionOnStream): New field.
	(readObject): New serialization method.
	* java/text/DecimalFormatSymbols.java (monetarySeparator): New field.
	(serialVersionOnStream): New field.
	(readObject): New serialization method.
	(getMonetaryDecimalSeparator): New method.
	(setMonetaryDecimalSeparator): New method.
	* java/text/NumberFormat.java (maxFractionDigits): New field.
	(maxIntegerDigits): New field.
	(minFractionDigits): New field.
	(minIntegerDigits): New field.
	(serialVersionOnStream): New field.
	(serialVersionUID): New field.
	(readObject): New serialization method.
	(writeObject): New serialization method.
	* java/text/SimpleDateFormat.java (defaultCenturyStart): Initialized.
	(serialVersionOnStream): New field.
	(serialVersionUID): New field.
	(readObject): New serialization method.

Serialization mods.

From-SVN: r36831
2000-10-10 23:09:08 +00:00
Tom Tromey 2ba5f77454 All files: Updated copyright information.
* All files: Updated copyright information.
	* COPYING: New file.
	* COPYING.LIB: Removed.
	* LIBGCJ_LICENSE: We now use GPL + special exception.

From-SVN: r32387
2000-03-07 19:55:28 +00:00
Tom Tromey 14447d9674 Calendar.java (toString): New method.
* 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-02-03 18:26:51 +00:00
Tom Tromey 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +00:00
Tom Tromey ee9dd3721b Initial revision
From-SVN: r26263
1999-04-07 14:42:40 +00:00