This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
gcc/libjava ChangeLog java/text/SimpleDateForm ...
- To: gcc-cvs at gcc dot gnu dot org, java-cvs at gcc dot gnu dot org
- Subject: gcc/libjava ChangeLog java/text/SimpleDateForm ...
- From: bryce at gcc dot gnu dot org
- Date: 26 Jul 2001 11:21:46 -0000
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: bryce@gcc.gnu.org 2001-07-26 04:21:46
Modified files:
libjava : ChangeLog
libjava/java/text: SimpleDateFormat.java
libjava/java/util: GregorianCalendar.java Calendar.java
Log message:
* 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().
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.837&r2=1.838
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/text/SimpleDateFormat.java.diff?cvsroot=gcc&r1=1.12&r2=1.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/util/GregorianCalendar.java.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/util/Calendar.java.diff?cvsroot=gcc&r1=1.9&r2=1.10