2001-05-10 20:13:17 +02:00
|
|
|
/* java.util.GregorianCalendar
|
2004-06-11 07:54:02 +02:00
|
|
|
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004
|
|
|
|
Free Software Foundation, Inc.
|
1999-04-07 16:42:40 +02:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
This file is part of GNU Classpath.
|
|
|
|
|
|
|
|
GNU Classpath is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
GNU Classpath is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
2005-06-30 05:22:09 +02:00
|
|
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
02110-1301 USA.
|
2001-05-10 20:13:17 +02:00
|
|
|
|
2002-01-22 23:40:42 +01:00
|
|
|
Linking this library statically or dynamically with other modules is
|
|
|
|
making a combined work based on this library. Thus, the terms and
|
|
|
|
conditions of the GNU General Public License cover the whole
|
|
|
|
combination.
|
|
|
|
|
|
|
|
As a special exception, the copyright holders of this library give you
|
|
|
|
permission to link this library with independent modules to produce an
|
|
|
|
executable, regardless of the license terms of these independent
|
|
|
|
modules, and to copy and distribute the resulting executable under
|
|
|
|
terms of your choice, provided that you also meet, for each linked
|
|
|
|
independent module, the terms and conditions of the license of that
|
|
|
|
module. An independent module is a module which is not derived from
|
|
|
|
or based on this library. If you modify this library, you may extend
|
|
|
|
this exception to your version of the library, but you are not
|
|
|
|
obligated to do so. If you do not wish to do so, delete this
|
|
|
|
exception statement from your version. */
|
1999-04-07 16:42:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
package java.util;
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
1999-04-07 16:42:40 +02:00
|
|
|
/**
|
2004-11-07 12:55:09 +01:00
|
|
|
* <p>
|
2001-05-10 20:13:17 +02:00
|
|
|
* This class represents the Gregorian calendar, that is used in most
|
|
|
|
* countries all over the world. It does also handle the Julian calendar
|
|
|
|
* for dates smaller than the date of the change to the Gregorian calendar.
|
|
|
|
* The Gregorian calendar differs from the Julian calendar by a different
|
|
|
|
* leap year rule (no leap year every 100 years, except if year is divisible
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* by 400).
|
2004-11-07 12:55:09 +01:00
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* This change date is different from country to country, and can be changed with
|
|
|
|
* <code>setGregorianChange</code>. The first countries to adopt the Gregorian
|
|
|
|
* calendar did so on the 15th of October, 1582. This date followed October
|
|
|
|
* the 4th, 1582 in the Julian calendar system. The non-existant days that were
|
|
|
|
* omitted when the change took place are interpreted as Gregorian dates.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* Prior to the changeover date, New Year's Day occurred on the 25th of March.
|
|
|
|
* However, this class always takes New Year's Day as being the 1st of January.
|
|
|
|
* Client code should manually adapt the year value, if required, for dates
|
|
|
|
* between January the 1st and March the 24th in years prior to the changeover.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* Any date infinitely forwards or backwards in time can be represented by
|
|
|
|
* this class. A <em>proleptic</em> calendar system is used, which allows
|
|
|
|
* future dates to be created via the existing rules. This allows meaningful
|
|
|
|
* and consistent dates to be produced for all years. However, dates are only
|
|
|
|
* historically accurate following March the 1st, 4AD when the Julian calendar
|
|
|
|
* system was adopted. Prior to this, leap year rules were applied erraticly.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* There are two eras available for the Gregorian calendar, namely BC and AD.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* Weeks are defined as a period of seven days, beginning on the first day
|
|
|
|
* of the week, as returned by <code>getFirstDayOfWeek()</code>, and ending
|
|
|
|
* on the day prior to this.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* The weeks of the year are numbered from 1 to a possible 53. The first week
|
|
|
|
* of the year is defined as the first week that contains at least the minimum
|
|
|
|
* number of days of the first week in the new year (retrieved via
|
|
|
|
* <code>getMinimalDaysInFirstWeek()</code>). All weeks after this are numbered
|
|
|
|
* from 2 onwards.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* For example, take the year 2004. It began on a Thursday. The first week
|
|
|
|
* of 2004 depends both on where a week begins and how long it must minimally
|
|
|
|
* last. Let's say that the week begins on a Monday and must have a minimum
|
|
|
|
* of 5 days. In this case, the first week begins on Monday, the 5th of January.
|
|
|
|
* The first 4 days (Thursday to Sunday) are not eligible, as they are too few
|
|
|
|
* to make up the minimum number of days of the first week which must be in
|
|
|
|
* the new year. If the minimum was lowered to 4 days, then the first week
|
|
|
|
* would instead begin on Monday, the 29th of December, 2003. This first week
|
|
|
|
* has 4 of its days in the new year, and is now eligible.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* The weeks of the month are numbered from 0 to a possible 6. The first week
|
|
|
|
* of the month (numbered 1) is a set of days, prior to the first day of the week,
|
|
|
|
* which number at least the minimum number of days in a week. Unlike the first
|
|
|
|
* week of the year, the first week of the month only uses days from that particular
|
|
|
|
* month. As a consequence, it may have a variable number of days (from the minimum
|
|
|
|
* number required up to a full week of 7) and it need not start on the first day of
|
|
|
|
* the week. It must, however, be following by the first day of the week, as this
|
|
|
|
* marks the beginning of week 2. Any days of the month which occur prior to the
|
|
|
|
* first week (because the first day of the week occurs before the minimum number
|
|
|
|
* of days is met) are seen as week 0.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* Again, we will take the example of the year 2004 to demonstrate this. September
|
|
|
|
* 2004 begins on a Wednesday. Taking our first day of the week as Monday, and the
|
|
|
|
* minimum length of the first week as 6, we find that week 1 runs from Monday,
|
|
|
|
* the 6th of September to Sunday the 12th. Prior to the 6th, there are only
|
|
|
|
* 5 days (Wednesday through to Sunday). This is too small a number to meet the
|
|
|
|
* minimum, so these are classed as being days in week 0. Week 2 begins on the
|
|
|
|
* 13th, and so on. This changes if we reduce the minimum to 5. In this case,
|
|
|
|
* week 1 is a truncated week from Wednesday the 1st to Sunday the 5th, and week
|
|
|
|
* 0 doesn't exist. The first seven day week is week 2, starting on the 6th.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* On using the <code>clear()</code> method, the Gregorian calendar returns
|
|
|
|
* to its default value of the 1st of January, 1970 AD 00:00:00 (the epoch).
|
|
|
|
* The day of the week is set to the correct day for that particular time.
|
|
|
|
* The day is also the first of the month, and the date is in week 0.
|
|
|
|
* </p>
|
2001-05-10 20:13:17 +02:00
|
|
|
*
|
|
|
|
* @see Calendar
|
|
|
|
* @see TimeZone
|
2004-11-07 12:55:09 +01:00
|
|
|
* @see Calendar#getFirstDayOfWeek()
|
|
|
|
* @see Calendar#getMinimalDaysInFirstWeek()
|
1999-04-07 16:42:40 +02:00
|
|
|
*/
|
2001-05-10 20:13:17 +02:00
|
|
|
public class GregorianCalendar extends Calendar
|
|
|
|
{
|
|
|
|
/**
|
2004-11-07 12:55:09 +01:00
|
|
|
* Constant representing the era BC (Before Christ).
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
1999-04-07 16:42:40 +02:00
|
|
|
public static final int BC = 0;
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Constant representing the era AD (Anno Domini).
|
|
|
|
*/
|
1999-04-07 16:42:40 +02:00
|
|
|
public static final int AD = 1;
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* The point at which the Gregorian calendar rules were used.
|
|
|
|
* This is locale dependent; the default for most catholic
|
|
|
|
* countries is midnight (UTC) on October 5, 1582 (Julian),
|
|
|
|
* or October 15, 1582 (Gregorian).
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
|
|
|
* @serial the changeover point from the Julian calendar
|
|
|
|
* system to the Gregorian.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
private long gregorianCutover;
|
|
|
|
|
2004-11-07 12:55:09 +01:00
|
|
|
/**
|
|
|
|
* For compatability with Sun's JDK.
|
|
|
|
*/
|
2001-05-10 20:13:17 +02:00
|
|
|
static final long serialVersionUID = -8125100834729963327L;
|
|
|
|
|
|
|
|
/**
|
2003-09-18 08:34:00 +02:00
|
|
|
* The name of the resource bundle. Used only by getBundle()
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
private static final String bundleName = "gnu.java.locale.Calendar";
|
|
|
|
|
2003-09-18 08:34:00 +02:00
|
|
|
/**
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* Days in the epoch. Relative Jan 1, year '0' which is not a leap year.
|
|
|
|
* (although there is no year zero, this does not matter.)
|
|
|
|
* This is consistent with the formula:
|
|
|
|
* = (year-1)*365L + ((year-1) >> 2)
|
|
|
|
*
|
|
|
|
* Plus the gregorian correction:
|
|
|
|
* Math.floor((year-1) / 400.) - Math.floor((year-1) / 100.);
|
|
|
|
* For a correct julian date, the correction is -2 instead.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* The gregorian cutover in 1582 was 10 days, so by calculating the
|
|
|
|
* correction from year zero, we have 15 non-leap days (even centuries)
|
|
|
|
* minus 3 leap days (year 400,800,1200) = 12. Subtracting two corrects
|
|
|
|
* this to the correct number 10.
|
2003-09-18 08:34:00 +02:00
|
|
|
*/
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
private static final int EPOCH_DAYS = 719162;
|
2003-09-18 08:34:00 +02:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Constructs a new GregorianCalender representing the current
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* time, using the default time zone and the default locale.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public GregorianCalendar()
|
|
|
|
{
|
|
|
|
this(TimeZone.getDefault(), Locale.getDefault());
|
|
|
|
}
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Constructs a new GregorianCalender representing the current
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* time, using the specified time zone and the default locale.
|
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param zone a time zone.
|
|
|
|
*/
|
|
|
|
public GregorianCalendar(TimeZone zone)
|
|
|
|
{
|
|
|
|
this(zone, Locale.getDefault());
|
|
|
|
}
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Constructs a new GregorianCalender representing the current
|
2004-11-07 12:55:09 +01:00
|
|
|
* time, using the default time zone and the specified locale.
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param locale a locale.
|
|
|
|
*/
|
|
|
|
public GregorianCalendar(Locale locale)
|
|
|
|
{
|
|
|
|
this(TimeZone.getDefault(), locale);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs a new GregorianCalender representing the current
|
|
|
|
* time with the given time zone and the given locale.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* @param zone a time zone.
|
|
|
|
* @param locale a locale.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public GregorianCalendar(TimeZone zone, Locale locale)
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
{
|
|
|
|
this(zone, locale, false);
|
|
|
|
setTimeInMillis(System.currentTimeMillis());
|
|
|
|
complete();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Common constructor that all constructors should call.
|
|
|
|
* @param zone a time zone.
|
|
|
|
* @param locale a locale.
|
|
|
|
* @param unused unused parameter to make the signature differ from
|
|
|
|
* the public constructor (TimeZone, Locale).
|
|
|
|
*/
|
|
|
|
private GregorianCalendar(TimeZone zone, Locale locale, boolean unused)
|
2001-05-10 20:13:17 +02:00
|
|
|
{
|
|
|
|
super(zone, locale);
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
ResourceBundle rb = ResourceBundle.getBundle(bundleName, locale,
|
|
|
|
ClassLoader
|
|
|
|
.getSystemClassLoader());
|
2001-05-10 20:13:17 +02:00
|
|
|
gregorianCutover = ((Date) rb.getObject("gregorianCutOver")).getTime();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs a new GregorianCalendar representing midnight on the
|
|
|
|
* given date with the default time zone and locale.
|
|
|
|
* @param year corresponds to the YEAR time field.
|
|
|
|
* @param month corresponds to the MONTH time field.
|
|
|
|
* @param day corresponds to the DAY time field.
|
|
|
|
*/
|
|
|
|
public GregorianCalendar(int year, int month, int day)
|
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
this(TimeZone.getDefault(), Locale.getDefault(), false);
|
2001-05-10 20:13:17 +02:00
|
|
|
set(year, month, day);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs a new GregorianCalendar representing midnight on the
|
|
|
|
* given date with the default time zone and locale.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param year corresponds to the YEAR time field.
|
|
|
|
* @param month corresponds to the MONTH time field.
|
|
|
|
* @param day corresponds to the DAY time field.
|
|
|
|
* @param hour corresponds to the HOUR_OF_DAY time field.
|
|
|
|
* @param minute corresponds to the MINUTE time field.
|
|
|
|
*/
|
|
|
|
public GregorianCalendar(int year, int month, int day, int hour, int minute)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
this(TimeZone.getDefault(), Locale.getDefault(), false);
|
2001-05-10 20:13:17 +02:00
|
|
|
set(year, month, day, hour, minute);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Constructs a new GregorianCalendar representing midnight on the
|
|
|
|
* given date with the default time zone and locale.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param year corresponds to the YEAR time field.
|
|
|
|
* @param month corresponds to the MONTH time field.
|
|
|
|
* @param day corresponds to the DAY time field.
|
|
|
|
* @param hour corresponds to the HOUR_OF_DAY time field.
|
|
|
|
* @param minute corresponds to the MINUTE time field.
|
|
|
|
* @param second corresponds to the SECOND time field.
|
|
|
|
*/
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
public GregorianCalendar(int year, int month, int day, int hour, int minute,
|
|
|
|
int second)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
this(TimeZone.getDefault(), Locale.getDefault(), false);
|
2001-05-10 20:13:17 +02:00
|
|
|
set(year, month, day, hour, minute, second);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Sets the date of the switch from Julian dates to Gregorian dates.
|
|
|
|
* You can use <code>new Date(Long.MAX_VALUE)</code> to use a pure
|
|
|
|
* Julian calendar, or <code>Long.MIN_VALUE</code> for a pure Gregorian
|
|
|
|
* calendar.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param date the date of the change.
|
|
|
|
*/
|
|
|
|
public void setGregorianChange(Date date)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
gregorianCutover = date.getTime();
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Gets the date of the switch from Julian dates to Gregorian dates.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @return the date of the change.
|
|
|
|
*/
|
2001-10-23 06:16:13 +02:00
|
|
|
public final Date getGregorianChange()
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
return new Date(gregorianCutover);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
2004-11-07 12:55:09 +01:00
|
|
|
* <p>
|
2001-05-10 20:13:17 +02:00
|
|
|
* Determines if the given year is a leap year. The result is
|
2004-11-07 12:55:09 +01:00
|
|
|
* undefined if the Gregorian change took place in 1800, so that
|
|
|
|
* the end of February is skipped, and that year is specified.
|
|
|
|
* (well...).
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* To specify a year in the BC era, use a negative value calculated
|
|
|
|
* as 1 - y, where y is the required year in BC. So, 1 BC is 0,
|
|
|
|
* 2 BC is -1, 3 BC is -2, etc.
|
|
|
|
* </p>
|
2001-05-10 20:13:17 +02:00
|
|
|
*
|
2004-11-07 12:55:09 +01:00
|
|
|
* @param year a year (use a negative value for BC).
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* @return true, if the given year is a leap year, false otherwise.
|
2004-11-07 12:55:09 +01:00
|
|
|
*/
|
2001-05-10 20:13:17 +02:00
|
|
|
public boolean isLeapYear(int year)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
// Only years divisible by 4 can be leap years
|
2001-05-10 20:13:17 +02:00
|
|
|
if ((year & 3) != 0)
|
|
|
|
return false;
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
// Is the leap-day a Julian date? Then it's a leap year
|
|
|
|
if (! isGregorian(year, 31 + 29 - 1))
|
2001-05-10 20:13:17 +02:00
|
|
|
return true;
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
// Apply gregorian rules otherwise
|
2001-05-10 20:13:17 +02:00
|
|
|
return ((year % 100) != 0 || (year % 400) == 0);
|
|
|
|
}
|
|
|
|
|
2004-11-07 12:55:09 +01:00
|
|
|
/**
|
|
|
|
* Retrieves the day of the week corresponding to the specified
|
|
|
|
* day of the specified year.
|
|
|
|
*
|
|
|
|
* @param year the year in which the dayOfYear occurs.
|
|
|
|
* @param dayOfYear the day of the year (an integer between 0 and
|
|
|
|
* and 366)
|
|
|
|
*/
|
2001-05-10 20:13:17 +02:00
|
|
|
private int getWeekDay(int year, int dayOfYear)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
boolean greg = isGregorian(year, dayOfYear);
|
|
|
|
int day = (int) getLinearDay(year, dayOfYear, greg);
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
// The epoch was a thursday.
|
|
|
|
int weekday = (day + THURSDAY) % 7;
|
|
|
|
if (weekday <= 0)
|
|
|
|
weekday += 7;
|
|
|
|
return weekday;
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* Returns the day of the week for the first day of a given month (0..11)
|
2004-11-07 12:55:09 +01:00
|
|
|
*/
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
private int getFirstDayOfMonth(int year, int month)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int[] dayCount = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
|
2001-05-10 20:13:17 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (month > 11)
|
|
|
|
{
|
|
|
|
year += (month / 12);
|
|
|
|
month = month % 12;
|
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (month < 0)
|
|
|
|
{
|
|
|
|
year += (int) month / 12;
|
|
|
|
month = month % 12;
|
|
|
|
if (month < 0)
|
2001-05-10 20:13:17 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
month += 12;
|
|
|
|
year--;
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int dayOfYear = dayCount[month] + 1;
|
|
|
|
if (month > 1)
|
|
|
|
if (isLeapYear(year))
|
|
|
|
dayOfYear++;
|
|
|
|
|
|
|
|
boolean greg = isGregorian(year, dayOfYear);
|
|
|
|
int day = (int) getLinearDay(year, dayOfYear, greg);
|
|
|
|
|
|
|
|
// The epoch was a thursday.
|
|
|
|
int weekday = (day + THURSDAY) % 7;
|
|
|
|
if (weekday <= 0)
|
|
|
|
weekday += 7;
|
|
|
|
return weekday;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Takes a year, and a (zero based) day of year and determines
|
|
|
|
* if it is gregorian or not.
|
|
|
|
*/
|
|
|
|
private boolean isGregorian(int year, int dayOfYear)
|
|
|
|
{
|
|
|
|
int relativeDay = (year - 1) * 365 + ((year - 1) >> 2) + dayOfYear
|
|
|
|
- EPOCH_DAYS; // gregorian days from 1 to epoch.
|
|
|
|
int gregFactor = (int) Math.floor((double) (year - 1) / 400.)
|
|
|
|
- (int) Math.floor((double) (year - 1) / 100.);
|
|
|
|
|
|
|
|
return ((relativeDay + gregFactor) * 60L * 60L * 24L * 1000L >= gregorianCutover);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Check set fields for validity, without leniency.
|
|
|
|
*
|
|
|
|
* @throws IllegalArgumentException if a field is invalid
|
|
|
|
*/
|
|
|
|
private void nonLeniencyCheck() throws IllegalArgumentException
|
|
|
|
{
|
|
|
|
int[] month_days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
|
|
|
int year = fields[YEAR];
|
|
|
|
int month = fields[MONTH];
|
|
|
|
int leap = isLeapYear(year) ? 1 : 0;
|
|
|
|
|
|
|
|
if (isSet[ERA] && fields[ERA] != AD && fields[ERA] != BC)
|
|
|
|
throw new IllegalArgumentException("Illegal ERA.");
|
|
|
|
if (isSet[YEAR] && fields[YEAR] < 1)
|
|
|
|
throw new IllegalArgumentException("Illegal YEAR.");
|
|
|
|
if (isSet[MONTH] && (month < 0 || month > 11))
|
|
|
|
throw new IllegalArgumentException("Illegal MONTH.");
|
|
|
|
if (isSet[WEEK_OF_YEAR])
|
|
|
|
{
|
|
|
|
int daysInYear = 365 + leap;
|
|
|
|
daysInYear += (getFirstDayOfMonth(year, 0) - 1); // pad first week
|
|
|
|
int last = getFirstDayOfMonth(year, 11) + 4;
|
|
|
|
if (last > 7)
|
|
|
|
last -= 7;
|
|
|
|
daysInYear += 7 - last;
|
|
|
|
int weeks = daysInYear / 7;
|
|
|
|
if (fields[WEEK_OF_YEAR] < 1 || fields[WEEK_OF_YEAR] > weeks)
|
|
|
|
throw new IllegalArgumentException("Illegal WEEK_OF_YEAR.");
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (isSet[WEEK_OF_MONTH])
|
2001-05-10 20:13:17 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int weeks = (month == 1 && leap == 0) ? 4 : 5;
|
|
|
|
if (fields[WEEK_OF_MONTH] < 1 || fields[WEEK_OF_MONTH] > weeks)
|
|
|
|
throw new IllegalArgumentException("Illegal WEEK_OF_MONTH.");
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
|
|
|
if (isSet[DAY_OF_MONTH])
|
|
|
|
if (fields[DAY_OF_MONTH] < 1
|
|
|
|
|| fields[DAY_OF_MONTH] > month_days[month]
|
|
|
|
+ ((month == 1) ? leap : 0))
|
|
|
|
throw new IllegalArgumentException("Illegal DAY_OF_MONTH.");
|
|
|
|
|
|
|
|
if (isSet[DAY_OF_YEAR]
|
|
|
|
&& (fields[DAY_OF_YEAR] < 1 || fields[DAY_OF_YEAR] > 365 + leap))
|
|
|
|
throw new IllegalArgumentException("Illegal DAY_OF_YEAR.");
|
|
|
|
|
|
|
|
if (isSet[DAY_OF_WEEK]
|
|
|
|
&& (fields[DAY_OF_WEEK] < 1 || fields[DAY_OF_WEEK] > 7))
|
|
|
|
throw new IllegalArgumentException("Illegal DAY_OF_WEEK.");
|
|
|
|
|
|
|
|
if (isSet[DAY_OF_WEEK_IN_MONTH])
|
2001-05-10 20:13:17 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int weeks = (month == 1 && leap == 0) ? 4 : 5;
|
|
|
|
if (fields[DAY_OF_WEEK_IN_MONTH] < -weeks
|
|
|
|
|| fields[DAY_OF_WEEK_IN_MONTH] > weeks)
|
|
|
|
throw new IllegalArgumentException("Illegal DAY_OF_WEEK_IN_MONTH.");
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (isSet[AM_PM] && fields[AM_PM] != AM && fields[AM_PM] != PM)
|
|
|
|
throw new IllegalArgumentException("Illegal AM_PM.");
|
2005-03-23 22:26:00 +01:00
|
|
|
if (isSet[HOUR] && (fields[HOUR] < 0 || fields[HOUR] > 11))
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
throw new IllegalArgumentException("Illegal HOUR.");
|
|
|
|
if (isSet[HOUR_OF_DAY]
|
|
|
|
&& (fields[HOUR_OF_DAY] < 0 || fields[HOUR_OF_DAY] > 23))
|
|
|
|
throw new IllegalArgumentException("Illegal HOUR_OF_DAY.");
|
|
|
|
if (isSet[MINUTE] && (fields[MINUTE] < 0 || fields[MINUTE] > 59))
|
|
|
|
throw new IllegalArgumentException("Illegal MINUTE.");
|
|
|
|
if (isSet[SECOND] && (fields[SECOND] < 0 || fields[SECOND] > 59))
|
|
|
|
throw new IllegalArgumentException("Illegal SECOND.");
|
|
|
|
if (isSet[MILLISECOND]
|
|
|
|
&& (fields[MILLISECOND] < 0 || fields[MILLISECOND] > 999))
|
|
|
|
throw new IllegalArgumentException("Illegal MILLISECOND.");
|
|
|
|
if (isSet[ZONE_OFFSET]
|
|
|
|
&& (fields[ZONE_OFFSET] < -12 * 60 * 60 * 1000L
|
|
|
|
|| fields[ZONE_OFFSET] > 12 * 60 * 60 * 1000L))
|
|
|
|
throw new IllegalArgumentException("Illegal ZONE_OFFSET.");
|
|
|
|
if (isSet[DST_OFFSET]
|
|
|
|
&& (fields[DST_OFFSET] < -12 * 60 * 60 * 1000L
|
|
|
|
|| fields[DST_OFFSET] > 12 * 60 * 60 * 1000L))
|
|
|
|
throw new IllegalArgumentException("Illegal DST_OFFSET.");
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Converts the time field values (<code>fields</code>) to
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* milliseconds since the epoch UTC (<code>time</code>).
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
|
|
|
* @throws IllegalArgumentException if any calendar fields
|
|
|
|
* are invalid.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
protected synchronized void computeTime()
|
1999-04-26 17:34:44 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int millisInDay = 0;
|
|
|
|
int era = fields[ERA];
|
|
|
|
int year = fields[YEAR];
|
|
|
|
int month = fields[MONTH];
|
|
|
|
int day = fields[DAY_OF_MONTH];
|
|
|
|
|
|
|
|
int minute = fields[MINUTE];
|
|
|
|
int second = fields[SECOND];
|
|
|
|
int millis = fields[MILLISECOND];
|
|
|
|
int[] month_days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
|
|
|
int[] dayCount = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
|
|
|
|
int hour = 0;
|
2001-05-10 20:13:17 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isLenient())
|
|
|
|
nonLeniencyCheck();
|
2001-07-26 13:21:45 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isSet[MONTH] && (! isSet[DAY_OF_WEEK] || isSet[WEEK_OF_YEAR]))
|
|
|
|
{
|
|
|
|
// 5: YEAR + DAY_OF_WEEK + WEEK_OF_YEAR
|
|
|
|
if (isSet[WEEK_OF_YEAR])
|
|
|
|
{
|
|
|
|
int first = getFirstDayOfMonth(year, 0);
|
|
|
|
int offs = 1;
|
|
|
|
int daysInFirstWeek = getFirstDayOfWeek() - first;
|
|
|
|
if (daysInFirstWeek <= 0)
|
|
|
|
daysInFirstWeek += 7;
|
|
|
|
|
|
|
|
if (daysInFirstWeek < getMinimalDaysInFirstWeek())
|
|
|
|
offs += daysInFirstWeek;
|
|
|
|
else
|
|
|
|
offs -= 7 - daysInFirstWeek;
|
|
|
|
month = 0;
|
|
|
|
day = offs + 7 * (fields[WEEK_OF_YEAR] - 1);
|
|
|
|
offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek();
|
|
|
|
|
|
|
|
if (offs < 0)
|
|
|
|
offs += 7;
|
|
|
|
day += offs;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// 4: YEAR + DAY_OF_YEAR
|
|
|
|
month = 0;
|
|
|
|
day = fields[DAY_OF_YEAR];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (isSet[DAY_OF_WEEK])
|
|
|
|
{
|
|
|
|
int first = getFirstDayOfMonth(year, month);
|
|
|
|
|
|
|
|
// 3: YEAR + MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK
|
|
|
|
if (isSet[DAY_OF_WEEK_IN_MONTH])
|
|
|
|
{
|
2005-03-23 22:26:00 +01:00
|
|
|
if (fields[DAY_OF_WEEK_IN_MONTH] < 0)
|
|
|
|
{
|
|
|
|
month++;
|
|
|
|
first = getFirstDayOfMonth(year, month);
|
|
|
|
day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1);
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int offs = fields[DAY_OF_WEEK] - first;
|
|
|
|
if (offs < 0)
|
|
|
|
offs += 7;
|
|
|
|
day += offs;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // 2: YEAR + MONTH + WEEK_OF_MONTH + DAY_OF_WEEK
|
|
|
|
int offs = 1;
|
|
|
|
int daysInFirstWeek = getFirstDayOfWeek() - first;
|
|
|
|
if (daysInFirstWeek <= 0)
|
|
|
|
daysInFirstWeek += 7;
|
|
|
|
|
|
|
|
if (daysInFirstWeek < getMinimalDaysInFirstWeek())
|
|
|
|
offs += daysInFirstWeek;
|
|
|
|
else
|
|
|
|
offs -= 7 - daysInFirstWeek;
|
|
|
|
|
|
|
|
day = offs + 7 * (fields[WEEK_OF_MONTH] - 1);
|
|
|
|
offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek();
|
2005-03-23 22:26:00 +01:00
|
|
|
if (offs <= 0)
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
offs += 7;
|
|
|
|
day += offs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 1: YEAR + MONTH + DAY_OF_MONTH
|
|
|
|
}
|
|
|
|
if (era == BC && year > 0)
|
|
|
|
year = 1 - year;
|
|
|
|
|
|
|
|
// rest of code assumes day/month/year set
|
|
|
|
// should negative BC years be AD?
|
|
|
|
// get the hour (but no check for validity)
|
|
|
|
if (isSet[HOUR])
|
2001-07-26 13:21:45 +02:00
|
|
|
{
|
|
|
|
hour = fields[HOUR];
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (fields[AM_PM] == PM)
|
2005-03-23 22:26:00 +01:00
|
|
|
hour += 12;
|
2001-07-26 13:21:45 +02:00
|
|
|
}
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
else
|
|
|
|
hour = fields[HOUR_OF_DAY];
|
2001-07-26 13:21:45 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
// Read the era,year,month,day fields and convert as appropriate.
|
|
|
|
// Calculate number of milliseconds into the day
|
|
|
|
// This takes care of both h, m, s, ms over/underflows.
|
|
|
|
long allMillis = (((hour * 60L) + minute) * 60L + second) * 1000L + millis;
|
|
|
|
day += allMillis / (24 * 60 * 60 * 1000L);
|
|
|
|
millisInDay = (int) (allMillis % (24 * 60 * 60 * 1000L));
|
2001-05-10 20:13:17 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (month < 0)
|
2001-05-10 20:13:17 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
year += (int) month / 12;
|
|
|
|
month = month % 12;
|
|
|
|
if (month < 0)
|
|
|
|
{
|
|
|
|
month += 12;
|
|
|
|
year--;
|
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (month > 11)
|
2001-05-10 20:13:17 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
year += (month / 12);
|
|
|
|
month = month % 12;
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
month_days[1] = isLeapYear(year) ? 29 : 28;
|
2001-05-10 20:13:17 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
while (day <= 0)
|
|
|
|
{
|
|
|
|
if (month == 0)
|
|
|
|
{
|
|
|
|
year--;
|
|
|
|
month_days[1] = isLeapYear(year) ? 29 : 28;
|
|
|
|
}
|
|
|
|
month = (month + 11) % 12;
|
|
|
|
day += month_days[month];
|
|
|
|
}
|
|
|
|
while (day > month_days[month])
|
|
|
|
{
|
|
|
|
day -= (month_days[month]);
|
|
|
|
month = (month + 1) % 12;
|
|
|
|
if (month == 0)
|
|
|
|
{
|
|
|
|
year++;
|
|
|
|
month_days[1] = isLeapYear(year) ? 29 : 28;
|
|
|
|
}
|
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
// ok, by here we have valid day,month,year,era and millisinday
|
|
|
|
int dayOfYear = dayCount[month] + day - 1; // (day starts on 1)
|
|
|
|
if (isLeapYear(year) && month > 1)
|
|
|
|
dayOfYear++;
|
|
|
|
|
|
|
|
int relativeDay = (year - 1) * 365 + ((year - 1) >> 2) + dayOfYear
|
|
|
|
- EPOCH_DAYS; // gregorian days from 1 to epoch.
|
|
|
|
int gregFactor = (int) Math.floor((double) (year - 1) / 400.)
|
|
|
|
- (int) Math.floor((double) (year - 1) / 100.);
|
|
|
|
|
|
|
|
if ((relativeDay + gregFactor) * 60L * 60L * 24L * 1000L >= gregorianCutover)
|
|
|
|
relativeDay += gregFactor;
|
|
|
|
else
|
|
|
|
relativeDay -= 2;
|
|
|
|
|
|
|
|
time = relativeDay * (24 * 60 * 60 * 1000L) + millisInDay;
|
|
|
|
|
|
|
|
// the epoch was a Thursday.
|
|
|
|
int weekday = (int) (relativeDay + THURSDAY) % 7;
|
2001-05-10 20:13:17 +02:00
|
|
|
if (weekday <= 0)
|
|
|
|
weekday += 7;
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
fields[DAY_OF_WEEK] = weekday;
|
1999-04-26 17:34:44 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
// Time zone corrections.
|
|
|
|
TimeZone zone = getTimeZone();
|
|
|
|
int rawOffset = isSet[ZONE_OFFSET] ? fields[ZONE_OFFSET]
|
|
|
|
: zone.getRawOffset();
|
1999-04-07 16:42:40 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int dstOffset = isSet[DST_OFFSET] ? fields[DST_OFFSET]
|
|
|
|
: (zone.getOffset((year < 0) ? BC : AD,
|
|
|
|
(year < 0) ? 1 - year
|
|
|
|
: year,
|
|
|
|
month, day, weekday,
|
|
|
|
millisInDay)
|
|
|
|
- zone.getRawOffset());
|
1999-04-07 16:42:40 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
time -= rawOffset + dstOffset;
|
|
|
|
|
|
|
|
isTimeSet = true;
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
1999-04-07 16:42:40 +02:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Get the linear day in days since the epoch, using the
|
|
|
|
* Julian or Gregorian calendar as specified. If you specify a
|
|
|
|
* nonpositive year it is interpreted as BC as following: 0 is 1
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* BC, -1 is 2 BC and so on.
|
2001-05-10 20:13:17 +02:00
|
|
|
*
|
|
|
|
* @param year the year of the date.
|
|
|
|
* @param dayOfYear the day of year of the date; 1 based.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @param gregorian <code>true</code>, if we should use the Gregorian rules.
|
|
|
|
* @return the days since the epoch, may be negative.
|
|
|
|
*/
|
2005-03-23 22:26:00 +01:00
|
|
|
private long getLinearDay(int year, int dayOfYear, boolean gregorian)
|
|
|
|
{
|
|
|
|
// The 13 is the number of days, that were omitted in the Gregorian
|
|
|
|
// Calender until the epoch.
|
|
|
|
// We shift right by 2 instead of dividing by 4, to get correct
|
|
|
|
// results for negative years (and this is even more efficient).
|
|
|
|
long julianDay = (year - 1) * 365L + ((year - 1) >> 2) + (dayOfYear - 1)
|
|
|
|
- EPOCH_DAYS; // gregorian days from 1 to epoch.
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
if (gregorian)
|
|
|
|
{
|
|
|
|
// subtract the days that are missing in gregorian calendar
|
|
|
|
// with respect to julian calendar.
|
|
|
|
//
|
|
|
|
// Okay, here we rely on the fact that the gregorian
|
|
|
|
// calendar was introduced in the AD era. This doesn't work
|
|
|
|
// with negative years.
|
|
|
|
//
|
|
|
|
// The additional leap year factor accounts for the fact that
|
|
|
|
// a leap day is not seen on Jan 1 of the leap year.
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int gregOffset = (int) Math.floor((double) (year - 1) / 400.)
|
|
|
|
- (int) Math.floor((double) (year - 1) / 100.);
|
|
|
|
|
|
|
|
return julianDay + gregOffset;
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
else
|
|
|
|
julianDay -= 2;
|
2001-05-10 20:13:17 +02:00
|
|
|
return julianDay;
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Converts the given linear day into era, year, month,
|
|
|
|
* day_of_year, day_of_month, day_of_week, and writes the result
|
|
|
|
* into the fields array.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* @param day the linear day.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @param gregorian true, if we should use Gregorian rules.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
private void calculateDay(int[] fields, long day, boolean gregorian)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
// the epoch was a Thursday.
|
|
|
|
int weekday = (int) (day + THURSDAY) % 7;
|
2001-05-10 20:13:17 +02:00
|
|
|
if (weekday <= 0)
|
|
|
|
weekday += 7;
|
|
|
|
fields[DAY_OF_WEEK] = weekday;
|
|
|
|
|
|
|
|
// get a first approximation of the year. This may be one
|
2004-10-10 18:19:37 +02:00
|
|
|
// year too big.
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int year = 1970
|
|
|
|
+ (int) (gregorian
|
|
|
|
? ((day - 100L) * 400L) / (365L * 400L + 100L - 4L
|
|
|
|
+ 1L) : ((day - 100L) * 4L) / (365L * 4L + 1L));
|
2001-05-10 20:13:17 +02:00
|
|
|
if (day >= 0)
|
|
|
|
year++;
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
long firstDayOfYear = getLinearDay(year, 1, gregorian);
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
// Now look in which year day really lies.
|
|
|
|
if (day < firstDayOfYear)
|
|
|
|
{
|
|
|
|
year--;
|
|
|
|
firstDayOfYear = getLinearDay(year, 1, gregorian);
|
|
|
|
}
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
day -= firstDayOfYear - 1; // day of year, one based.
|
1999-04-07 16:42:40 +02:00
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
fields[DAY_OF_YEAR] = (int) day;
|
2001-05-10 20:13:17 +02:00
|
|
|
if (year <= 0)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
fields[ERA] = BC;
|
|
|
|
fields[YEAR] = 1 - year;
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
fields[ERA] = AD;
|
|
|
|
fields[YEAR] = year;
|
|
|
|
}
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int leapday = isLeapYear(year) ? 1 : 0;
|
2001-05-10 20:13:17 +02:00
|
|
|
if (day <= 31 + 28 + leapday)
|
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
fields[MONTH] = (int) day / 32; // 31->JANUARY, 32->FEBRUARY
|
|
|
|
fields[DAY_OF_MONTH] = (int) day - 31 * fields[MONTH];
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// A few more magic formulas
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int scaledDay = ((int) day - leapday) * 5 + 8;
|
2001-05-10 20:13:17 +02:00
|
|
|
fields[MONTH] = scaledDay / (31 + 30 + 31 + 30 + 31);
|
|
|
|
fields[DAY_OF_MONTH] = (scaledDay % (31 + 30 + 31 + 30 + 31)) / 5 + 1;
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Converts the milliseconds since the epoch UTC
|
|
|
|
* (<code>time</code>) to time fields
|
2004-11-07 12:55:09 +01:00
|
|
|
* (<code>fields</code>).
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
protected synchronized void computeFields()
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
boolean gregorian = (time >= gregorianCutover);
|
|
|
|
|
|
|
|
TimeZone zone = getTimeZone();
|
|
|
|
fields[ZONE_OFFSET] = zone.getRawOffset();
|
|
|
|
long localTime = time + fields[ZONE_OFFSET];
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
long day = localTime / (24 * 60 * 60 * 1000L);
|
2001-05-10 20:13:17 +02:00
|
|
|
int millisInDay = (int) (localTime % (24 * 60 * 60 * 1000L));
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
if (millisInDay < 0)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
millisInDay += (24 * 60 * 60 * 1000);
|
|
|
|
day--;
|
|
|
|
}
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
calculateDay(fields, day, gregorian);
|
|
|
|
fields[DST_OFFSET] = zone.getOffset(fields[ERA], fields[YEAR],
|
|
|
|
fields[MONTH], fields[DAY_OF_MONTH],
|
|
|
|
fields[DAY_OF_WEEK], millisInDay)
|
|
|
|
- fields[ZONE_OFFSET];
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
millisInDay += fields[DST_OFFSET];
|
|
|
|
if (millisInDay >= 24 * 60 * 60 * 1000)
|
|
|
|
{
|
|
|
|
millisInDay -= 24 * 60 * 60 * 1000;
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
calculateDay(fields, ++day, gregorian);
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
|
|
|
|
2003-12-30 20:56:49 +01:00
|
|
|
fields[DAY_OF_WEEK_IN_MONTH] = (fields[DAY_OF_MONTH] + 6) / 7;
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
// which day of the week are we (0..6), relative to getFirstDayOfWeek
|
|
|
|
int relativeWeekday = (7 + fields[DAY_OF_WEEK] - getFirstDayOfWeek()) % 7;
|
|
|
|
|
2003-11-27 10:16:13 +01:00
|
|
|
fields[WEEK_OF_MONTH] = (fields[DAY_OF_MONTH] - relativeWeekday + 12) / 7;
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
int weekOfYear = (fields[DAY_OF_YEAR] - relativeWeekday + 6) / 7;
|
|
|
|
|
|
|
|
// Do the Correction: getMinimalDaysInFirstWeek() is always in the
|
|
|
|
// first week.
|
|
|
|
int minDays = getMinimalDaysInFirstWeek();
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int firstWeekday = (7 + getWeekDay(fields[YEAR], minDays)
|
|
|
|
- getFirstDayOfWeek()) % 7;
|
2001-05-10 20:13:17 +02:00
|
|
|
if (minDays - firstWeekday < 1)
|
|
|
|
weekOfYear++;
|
|
|
|
fields[WEEK_OF_YEAR] = weekOfYear;
|
|
|
|
|
|
|
|
int hourOfDay = millisInDay / (60 * 60 * 1000);
|
|
|
|
fields[AM_PM] = (hourOfDay < 12) ? AM : PM;
|
|
|
|
int hour = hourOfDay % 12;
|
2005-03-23 22:26:00 +01:00
|
|
|
fields[HOUR] = hour;
|
2001-05-10 20:13:17 +02:00
|
|
|
fields[HOUR_OF_DAY] = hourOfDay;
|
|
|
|
millisInDay %= (60 * 60 * 1000);
|
|
|
|
fields[MINUTE] = millisInDay / (60 * 1000);
|
|
|
|
millisInDay %= (60 * 1000);
|
|
|
|
fields[SECOND] = millisInDay / (1000);
|
|
|
|
fields[MILLISECOND] = millisInDay % 1000;
|
|
|
|
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
areFieldsSet = isSet[ERA] = isSet[YEAR] = isSet[MONTH] = isSet[WEEK_OF_YEAR] = isSet[WEEK_OF_MONTH] = isSet[DAY_OF_MONTH] = isSet[DAY_OF_YEAR] = isSet[DAY_OF_WEEK] = isSet[DAY_OF_WEEK_IN_MONTH] = isSet[AM_PM] = isSet[HOUR] = isSet[HOUR_OF_DAY] = isSet[MINUTE] = isSet[SECOND] = isSet[MILLISECOND] = isSet[ZONE_OFFSET] = isSet[DST_OFFSET] = true;
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
2005-11-16 20:43:53 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a hash code for this object, following the general contract
|
|
|
|
* specified by {@link Object#hashCode()}.
|
|
|
|
* @return the hash code
|
|
|
|
*/
|
|
|
|
public int hashCode()
|
|
|
|
{
|
|
|
|
int val = (int) ((gregorianCutover >>> 32) ^ (gregorianCutover & 0xffffffff));
|
|
|
|
return super.hashCode() ^ val;
|
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
/**
|
2004-11-07 12:55:09 +01:00
|
|
|
* Compares the given calendar with this. An object, o, is
|
|
|
|
* equivalent to this if it is also a <code>GregorianCalendar</code>
|
|
|
|
* with the same time since the epoch under the same conditions
|
|
|
|
* (same change date and same time zone).
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param o the object to that we should compare.
|
|
|
|
* @return true, if the given object is a calendar, that represents
|
2004-11-07 12:55:09 +01:00
|
|
|
* the same time (but doesn't necessarily have the same fields).
|
|
|
|
* @throws IllegalArgumentException if one of the fields
|
|
|
|
* <code>ZONE_OFFSET</code> or <code>DST_OFFSET</code> is
|
|
|
|
* specified, if an unknown field is specified or if one
|
|
|
|
* of the calendar fields receives an illegal value when
|
|
|
|
* leniancy is not enabled.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public boolean equals(Object o)
|
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! (o instanceof GregorianCalendar))
|
2001-05-10 20:13:17 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
GregorianCalendar cal = (GregorianCalendar) o;
|
2005-11-16 20:43:53 +01:00
|
|
|
return (cal.gregorianCutover == gregorianCutover
|
|
|
|
&& super.equals(o));
|
2001-05-10 20:13:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds the specified amount of time to the given time field. The
|
|
|
|
* amount may be negative to subtract the time. If the field overflows
|
|
|
|
* it does what you expect: Jan, 25 + 10 Days is Feb, 4.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @param field one of the time field constants.
|
|
|
|
* @param amount the amount of time to add.
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* @exception IllegalArgumentException if <code>field</code> is
|
2004-10-10 18:19:37 +02:00
|
|
|
* <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or invalid; or
|
|
|
|
* if <code>amount</code> contains an out-of-range value and the calendar
|
|
|
|
* is not in lenient mode.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public void add(int field, int amount)
|
|
|
|
{
|
|
|
|
switch (field)
|
|
|
|
{
|
|
|
|
case YEAR:
|
|
|
|
complete();
|
|
|
|
fields[YEAR] += amount;
|
|
|
|
isTimeSet = false;
|
|
|
|
break;
|
1999-04-07 16:42:40 +02:00
|
|
|
case MONTH:
|
2001-05-10 20:13:17 +02:00
|
|
|
complete();
|
|
|
|
int months = fields[MONTH] + amount;
|
|
|
|
fields[YEAR] += months / 12;
|
|
|
|
fields[MONTH] = months % 12;
|
|
|
|
if (fields[MONTH] < 0)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
fields[MONTH] += 12;
|
|
|
|
fields[YEAR]--;
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
int maxDay = getActualMaximum(DAY_OF_MONTH);
|
|
|
|
if (fields[DAY_OF_MONTH] > maxDay)
|
2005-03-23 22:26:00 +01:00
|
|
|
fields[DAY_OF_MONTH] = maxDay;
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
set(YEAR, fields[YEAR]);
|
|
|
|
set(MONTH, fields[MONTH]);
|
1999-04-07 16:42:40 +02:00
|
|
|
break;
|
2001-05-10 20:13:17 +02:00
|
|
|
case DAY_OF_MONTH:
|
|
|
|
case DAY_OF_YEAR:
|
|
|
|
case DAY_OF_WEEK:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isTimeSet)
|
2001-05-10 20:13:17 +02:00
|
|
|
computeTime();
|
|
|
|
time += amount * (24 * 60 * 60 * 1000L);
|
|
|
|
areFieldsSet = false;
|
|
|
|
break;
|
|
|
|
case WEEK_OF_YEAR:
|
|
|
|
case WEEK_OF_MONTH:
|
|
|
|
case DAY_OF_WEEK_IN_MONTH:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isTimeSet)
|
2001-05-10 20:13:17 +02:00
|
|
|
computeTime();
|
|
|
|
time += amount * (7 * 24 * 60 * 60 * 1000L);
|
|
|
|
areFieldsSet = false;
|
|
|
|
break;
|
|
|
|
case AM_PM:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isTimeSet)
|
2001-05-10 20:13:17 +02:00
|
|
|
computeTime();
|
|
|
|
time += amount * (12 * 60 * 60 * 1000L);
|
|
|
|
areFieldsSet = false;
|
|
|
|
break;
|
|
|
|
case HOUR:
|
|
|
|
case HOUR_OF_DAY:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isTimeSet)
|
2001-05-10 20:13:17 +02:00
|
|
|
computeTime();
|
|
|
|
time += amount * (60 * 60 * 1000L);
|
|
|
|
areFieldsSet = false;
|
|
|
|
break;
|
|
|
|
case MINUTE:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isTimeSet)
|
2001-05-10 20:13:17 +02:00
|
|
|
computeTime();
|
|
|
|
time += amount * (60 * 1000L);
|
|
|
|
areFieldsSet = false;
|
|
|
|
break;
|
|
|
|
case SECOND:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isTimeSet)
|
2001-05-10 20:13:17 +02:00
|
|
|
computeTime();
|
|
|
|
time += amount * (1000L);
|
|
|
|
areFieldsSet = false;
|
|
|
|
break;
|
|
|
|
case MILLISECOND:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isTimeSet)
|
2001-05-10 20:13:17 +02:00
|
|
|
computeTime();
|
|
|
|
time += amount;
|
|
|
|
areFieldsSet = false;
|
|
|
|
break;
|
|
|
|
case ZONE_OFFSET:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
case DST_OFFSET:default:
|
2004-10-10 18:19:37 +02:00
|
|
|
throw new IllegalArgumentException("Invalid or unknown field");
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Rolls the specified time field up or down. This means add one
|
|
|
|
* to the specified field, but don't change the other fields. If
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* the maximum for this field is reached, start over with the
|
|
|
|
* minimum value.
|
2001-05-10 20:13:17 +02:00
|
|
|
*
|
|
|
|
* <strong>Note:</strong> There may be situation, where the other
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* fields must be changed, e.g rolling the month on May, 31.
|
|
|
|
* The date June, 31 is automatically converted to July, 1.
|
2001-05-10 20:13:17 +02:00
|
|
|
* This requires lenient settings.
|
|
|
|
*
|
|
|
|
* @param field the time field. One of the time field constants.
|
|
|
|
* @param up the direction, true for up, false for down.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @throws IllegalArgumentException if one of the fields
|
|
|
|
* <code>ZONE_OFFSET</code> or <code>DST_OFFSET</code> is
|
|
|
|
* specified, if an unknown field is specified or if one
|
|
|
|
* of the calendar fields receives an illegal value when
|
|
|
|
* leniancy is not enabled.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public void roll(int field, boolean up)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
roll(field, up ? 1 : -1);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2004-11-07 12:55:09 +01:00
|
|
|
/**
|
|
|
|
* Checks that the fields are still within their legal bounds,
|
|
|
|
* following use of the <code>roll()</code> method.
|
|
|
|
*
|
|
|
|
* @param field the field to check.
|
|
|
|
* @param delta multipler for alterations to the <code>time</code>.
|
|
|
|
* @see #roll(int, boolean)
|
|
|
|
* @see #roll(int, int)
|
|
|
|
*/
|
2001-05-10 20:13:17 +02:00
|
|
|
private void cleanUpAfterRoll(int field, int delta)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
switch (field)
|
|
|
|
{
|
|
|
|
case ERA:
|
|
|
|
case YEAR:
|
|
|
|
case MONTH:
|
|
|
|
// check that day of month is still in correct range
|
|
|
|
if (fields[DAY_OF_MONTH] > getActualMaximum(DAY_OF_MONTH))
|
|
|
|
fields[DAY_OF_MONTH] = getActualMaximum(DAY_OF_MONTH);
|
|
|
|
isTimeSet = false;
|
|
|
|
isSet[WEEK_OF_MONTH] = false;
|
|
|
|
isSet[DAY_OF_WEEK] = false;
|
|
|
|
isSet[DAY_OF_WEEK_IN_MONTH] = false;
|
|
|
|
isSet[DAY_OF_YEAR] = false;
|
|
|
|
isSet[WEEK_OF_YEAR] = false;
|
|
|
|
break;
|
|
|
|
case DAY_OF_MONTH:
|
|
|
|
isSet[WEEK_OF_MONTH] = false;
|
|
|
|
isSet[DAY_OF_WEEK] = false;
|
|
|
|
isSet[DAY_OF_WEEK_IN_MONTH] = false;
|
|
|
|
isSet[DAY_OF_YEAR] = false;
|
|
|
|
isSet[WEEK_OF_YEAR] = false;
|
|
|
|
time += delta * (24 * 60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case WEEK_OF_MONTH:
|
|
|
|
isSet[DAY_OF_MONTH] = false;
|
|
|
|
isSet[DAY_OF_WEEK_IN_MONTH] = false;
|
|
|
|
isSet[DAY_OF_YEAR] = false;
|
|
|
|
isSet[WEEK_OF_YEAR] = false;
|
|
|
|
time += delta * (7 * 24 * 60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case DAY_OF_WEEK_IN_MONTH:
|
|
|
|
isSet[DAY_OF_MONTH] = false;
|
|
|
|
isSet[WEEK_OF_MONTH] = false;
|
|
|
|
isSet[DAY_OF_YEAR] = false;
|
|
|
|
isSet[WEEK_OF_YEAR] = false;
|
|
|
|
time += delta * (7 * 24 * 60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case DAY_OF_YEAR:
|
|
|
|
isSet[MONTH] = false;
|
|
|
|
isSet[DAY_OF_MONTH] = false;
|
|
|
|
isSet[WEEK_OF_MONTH] = false;
|
|
|
|
isSet[DAY_OF_WEEK_IN_MONTH] = false;
|
|
|
|
isSet[DAY_OF_WEEK] = false;
|
|
|
|
isSet[WEEK_OF_YEAR] = false;
|
|
|
|
time += delta * (24 * 60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case WEEK_OF_YEAR:
|
|
|
|
isSet[MONTH] = false;
|
|
|
|
isSet[DAY_OF_MONTH] = false;
|
|
|
|
isSet[WEEK_OF_MONTH] = false;
|
|
|
|
isSet[DAY_OF_WEEK_IN_MONTH] = false;
|
|
|
|
isSet[DAY_OF_YEAR] = false;
|
|
|
|
time += delta * (7 * 24 * 60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case AM_PM:
|
|
|
|
isSet[HOUR_OF_DAY] = false;
|
|
|
|
time += delta * (12 * 60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case HOUR:
|
|
|
|
isSet[HOUR_OF_DAY] = false;
|
|
|
|
time += delta * (60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case HOUR_OF_DAY:
|
|
|
|
isSet[HOUR] = false;
|
|
|
|
isSet[AM_PM] = false;
|
|
|
|
time += delta * (60 * 60 * 1000L);
|
|
|
|
break;
|
|
|
|
case MINUTE:
|
|
|
|
time += delta * (60 * 1000L);
|
|
|
|
break;
|
|
|
|
case SECOND:
|
|
|
|
time += delta * (1000L);
|
|
|
|
break;
|
|
|
|
case MILLISECOND:
|
|
|
|
time += delta;
|
|
|
|
break;
|
|
|
|
}
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Rolls the specified time field by the given amount. This means
|
|
|
|
* add amount to the specified field, but don't change the other
|
|
|
|
* fields. If the maximum for this field is reached, start over
|
|
|
|
* with the minimum value and vice versa for negative amounts.
|
|
|
|
*
|
|
|
|
* <strong>Note:</strong> There may be situation, where the other
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* fields must be changed, e.g rolling the month on May, 31.
|
2001-05-10 20:13:17 +02:00
|
|
|
* The date June, 31 is automatically corrected to June, 30.
|
|
|
|
*
|
|
|
|
* @param field the time field. One of the time field constants.
|
|
|
|
* @param amount the amount by which we should roll.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @throws IllegalArgumentException if one of the fields
|
|
|
|
* <code>ZONE_OFFSET</code> or <code>DST_OFFSET</code> is
|
|
|
|
* specified, if an unknown field is specified or if one
|
|
|
|
* of the calendar fields receives an illegal value when
|
|
|
|
* leniancy is not enabled.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public void roll(int field, int amount)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
switch (field)
|
|
|
|
{
|
|
|
|
case DAY_OF_WEEK:
|
|
|
|
// day of week is special: it rolls automatically
|
|
|
|
add(field, amount);
|
|
|
|
return;
|
|
|
|
case ZONE_OFFSET:
|
|
|
|
case DST_OFFSET:
|
|
|
|
throw new IllegalArgumentException("Can't roll time zone");
|
|
|
|
}
|
|
|
|
complete();
|
|
|
|
int min = getActualMinimum(field);
|
|
|
|
int range = getActualMaximum(field) - min + 1;
|
|
|
|
int oldval = fields[field];
|
|
|
|
int newval = (oldval - min + range + amount) % range + min;
|
|
|
|
if (newval < min)
|
|
|
|
newval += range;
|
|
|
|
fields[field] = newval;
|
|
|
|
cleanUpAfterRoll(field, newval - oldval);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2004-11-07 12:55:09 +01:00
|
|
|
/**
|
|
|
|
* The minimum values for the calendar fields.
|
|
|
|
*/
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
private static final int[] minimums =
|
|
|
|
{
|
|
|
|
BC, 1, 0, 0, 1, 1, 1, SUNDAY, 1, AM,
|
|
|
|
1, 0, 0, 0, 0, -(12 * 60 * 60 * 1000),
|
|
|
|
0
|
|
|
|
};
|
2001-05-10 20:13:17 +02:00
|
|
|
|
2004-11-07 12:55:09 +01:00
|
|
|
/**
|
|
|
|
* The maximum values for the calendar fields.
|
|
|
|
*/
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
private static final int[] maximums =
|
|
|
|
{
|
|
|
|
AD, 5000000, 11, 53, 5, 31, 366,
|
|
|
|
SATURDAY, 5, PM, 12, 23, 59, 59, 999,
|
|
|
|
+(12 * 60 * 60 * 1000),
|
|
|
|
(12 * 60 * 60 * 1000)
|
|
|
|
};
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the smallest value that is allowed for the specified field.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
|
|
|
* @param field one of the time field constants.
|
|
|
|
* @return the smallest value for the specified field.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public int getMinimum(int field)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
return minimums[field];
|
|
|
|
}
|
1999-04-07 16:42:40 +02:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Gets the biggest value that is allowed for the specified field.
|
2004-11-07 12:55:09 +01:00
|
|
|
*
|
|
|
|
* @param field one of the time field constants.
|
2001-05-10 20:13:17 +02:00
|
|
|
* @return the biggest value.
|
|
|
|
*/
|
|
|
|
public int getMaximum(int field)
|
|
|
|
{
|
|
|
|
return maximums[field];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the greatest minimum value that is allowed for the specified field.
|
2004-11-07 12:55:09 +01:00
|
|
|
* This is the largest value returned by the <code>getActualMinimum(int)</code>
|
|
|
|
* method.
|
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param field the time field. One of the time field constants.
|
|
|
|
* @return the greatest minimum value.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @see #getActualMinimum(int)
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public int getGreatestMinimum(int field)
|
|
|
|
{
|
|
|
|
if (field == WEEK_OF_YEAR)
|
|
|
|
return 1;
|
|
|
|
return minimums[field];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the smallest maximum value that is allowed for the
|
2004-11-07 12:55:09 +01:00
|
|
|
* specified field. This is the smallest value returned
|
|
|
|
* by the <code>getActualMaximum(int)</code>. For example,
|
|
|
|
* this is 28 for DAY_OF_MONTH (as all months have at least
|
|
|
|
* 28 days).
|
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param field the time field. One of the time field constants.
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* @return the least maximum value.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @see #getActualMaximum(int)
|
|
|
|
* @since 1.2
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public int getLeastMaximum(int field)
|
|
|
|
{
|
|
|
|
switch (field)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
case WEEK_OF_YEAR:
|
|
|
|
return 52;
|
|
|
|
case DAY_OF_MONTH:
|
|
|
|
return 28;
|
|
|
|
case DAY_OF_YEAR:
|
|
|
|
return 365;
|
|
|
|
case DAY_OF_WEEK_IN_MONTH:
|
|
|
|
case WEEK_OF_MONTH:
|
|
|
|
return 4;
|
|
|
|
default:
|
|
|
|
return maximums[field];
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
/**
|
|
|
|
* Gets the actual minimum value that is allowed for the specified field.
|
HACKING, [...]: Fix spelling errors.
* HACKING, gnu/gcj/xlib/Pixmap.java, gnu/gcj/xlib/XException.java,
gnu/java/rmi/rmic/RMIC.java, java/awt/Window.java,
java/awt/AWTEvent.java, java/io/ByteArrayOutputStream.java,
java/io/CharConversionException.java,
java/io/PipedInputStream.java, java/io/PipedReader.java,
java/io/PrintWriter.java, java/io/WriteAbortedException.java,
java/io/natFileWin32.cc, java/lang/Class.h,
java/lang/natClassLoader.cc, java/lang/natObject.cc,
java/lang/Package.java, java/net/BindException.java,
java/net/ConnectException.java, java/net/ProtocolException.java,
java/net/SocketException.java,
java/net/UnknownServiceException.java,
java/security/cert/X509Certificate.java,
java/security/interfaces/DSAKey.java,
java/security/SecureRandom.java, java/security/SignedObject.java,
java/sql/DatabaseMetaData.java,
java/text/DecimalFormatSymbols.java,
java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
java/util/jar/JarInputStream.java,
java/util/jar/JarOutputStream.java, java/util/Calendar.java,
java/util/Collections.java, java/util/GregorianCalendar.java,
java/util/HashMap.java, java/util/List.java,
java/util/Properties.java, java/util/Timer.java,
java/util/Vector.java, java/util/WeakHashMap.java,
javax/naming/NamingException.java,
testsuite/libjava.lang/Thread_Wait.java,
org/xml/sax/helpers/DefaultHandler.java,
org/xml/sax/HandlerBase.java, org/xml/sax/SAXParseException.java,
ChangeLog, acinclude.m4, aclocal.m4, posix-threads.cc: Fix
spelling errors.
* configure: Regenerate.
From-SVN: r46665
2001-10-31 01:48:17 +01:00
|
|
|
* This value is dependent on the values of the other fields. Note that
|
2001-05-10 20:13:17 +02:00
|
|
|
* this calls <code>complete()</code> if not enough fields are set. This
|
2004-11-07 12:55:09 +01:00
|
|
|
* can have ugly side effects. The value given depends on the current
|
|
|
|
* time used by this instance.
|
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param field the time field. One of the time field constants.
|
|
|
|
* @return the actual minimum value.
|
2004-11-07 12:55:09 +01:00
|
|
|
* @since 1.2
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public int getActualMinimum(int field)
|
|
|
|
{
|
|
|
|
if (field == WEEK_OF_YEAR)
|
|
|
|
{
|
|
|
|
int min = getMinimalDaysInFirstWeek();
|
|
|
|
if (min == 0)
|
|
|
|
return 1;
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR])
|
2001-05-10 20:13:17 +02:00
|
|
|
complete();
|
|
|
|
|
|
|
|
int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR];
|
|
|
|
int weekday = getWeekDay(year, min);
|
|
|
|
if ((7 + weekday - getFirstDayOfWeek()) % 7 >= min - 1)
|
|
|
|
return 1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return minimums[field];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the actual maximum value that is allowed for the specified field.
|
HACKING, [...]: Fix spelling errors.
* HACKING, gnu/gcj/xlib/Pixmap.java, gnu/gcj/xlib/XException.java,
gnu/java/rmi/rmic/RMIC.java, java/awt/Window.java,
java/awt/AWTEvent.java, java/io/ByteArrayOutputStream.java,
java/io/CharConversionException.java,
java/io/PipedInputStream.java, java/io/PipedReader.java,
java/io/PrintWriter.java, java/io/WriteAbortedException.java,
java/io/natFileWin32.cc, java/lang/Class.h,
java/lang/natClassLoader.cc, java/lang/natObject.cc,
java/lang/Package.java, java/net/BindException.java,
java/net/ConnectException.java, java/net/ProtocolException.java,
java/net/SocketException.java,
java/net/UnknownServiceException.java,
java/security/cert/X509Certificate.java,
java/security/interfaces/DSAKey.java,
java/security/SecureRandom.java, java/security/SignedObject.java,
java/sql/DatabaseMetaData.java,
java/text/DecimalFormatSymbols.java,
java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
java/util/jar/JarInputStream.java,
java/util/jar/JarOutputStream.java, java/util/Calendar.java,
java/util/Collections.java, java/util/GregorianCalendar.java,
java/util/HashMap.java, java/util/List.java,
java/util/Properties.java, java/util/Timer.java,
java/util/Vector.java, java/util/WeakHashMap.java,
javax/naming/NamingException.java,
testsuite/libjava.lang/Thread_Wait.java,
org/xml/sax/helpers/DefaultHandler.java,
org/xml/sax/HandlerBase.java, org/xml/sax/SAXParseException.java,
ChangeLog, acinclude.m4, aclocal.m4, posix-threads.cc: Fix
spelling errors.
* configure: Regenerate.
From-SVN: r46665
2001-10-31 01:48:17 +01:00
|
|
|
* This value is dependent on the values of the other fields. Note that
|
2001-05-10 20:13:17 +02:00
|
|
|
* this calls <code>complete()</code> if not enough fields are set. This
|
2004-11-07 12:55:09 +01:00
|
|
|
* can have ugly side effects. The value given depends on the current time
|
|
|
|
* used by this instance; thus, leap years have a maximum day of month value of
|
|
|
|
* 29, rather than 28.
|
|
|
|
*
|
2001-05-10 20:13:17 +02:00
|
|
|
* @param field the time field. One of the time field constants.
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
* @return the actual maximum value.
|
2001-05-10 20:13:17 +02:00
|
|
|
*/
|
|
|
|
public int getActualMaximum(int field)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
switch (field)
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
case WEEK_OF_YEAR:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
{
|
|
|
|
if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR])
|
2001-05-10 20:13:17 +02:00
|
|
|
complete();
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
// This is wrong for the year that contains the gregorian change.
|
|
|
|
// I.e it gives the weeks in the julian year or in the gregorian
|
|
|
|
// year in that case.
|
|
|
|
int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR];
|
|
|
|
int lastDay = isLeapYear(year) ? 366 : 365;
|
|
|
|
int weekday = getWeekDay(year, lastDay);
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
int week = (lastDay + 6 - (7 + weekday - getFirstDayOfWeek()) % 7) / 7;
|
2001-05-10 20:13:17 +02:00
|
|
|
|
|
|
|
int minimalDays = getMinimalDaysInFirstWeek();
|
|
|
|
int firstWeekday = getWeekDay(year, minimalDays);
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
/*
|
2004-11-07 12:55:09 +01:00
|
|
|
* Is there a set of days at the beginning of the year, before the
|
|
|
|
* first day of the week, equal to or greater than the minimum number
|
|
|
|
* of days required in the first week?
|
|
|
|
*/
|
2001-05-10 20:13:17 +02:00
|
|
|
if (minimalDays - (7 + firstWeekday - getFirstDayOfWeek()) % 7 < 1)
|
2004-11-07 12:55:09 +01:00
|
|
|
return week + 1; /* Add week 1: firstWeekday through to firstDayOfWeek */
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
}
|
|
|
|
case DAY_OF_MONTH:
|
|
|
|
{
|
|
|
|
if (! areFieldsSet || ! isSet[MONTH])
|
2001-05-10 20:13:17 +02:00
|
|
|
complete();
|
|
|
|
int month = fields[MONTH];
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
// If you change this, you should also change
|
|
|
|
// SimpleTimeZone.getDaysInMonth();
|
|
|
|
if (month == FEBRUARY)
|
|
|
|
{
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
if (! isSet[YEAR] || ! isSet[ERA])
|
2001-05-10 20:13:17 +02:00
|
|
|
complete();
|
|
|
|
int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR];
|
|
|
|
return isLeapYear(year) ? 29 : 28;
|
|
|
|
}
|
|
|
|
else if (month < AUGUST)
|
|
|
|
return 31 - (month & 1);
|
|
|
|
else
|
|
|
|
return 30 + (month & 1);
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
case DAY_OF_YEAR:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
{
|
|
|
|
if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR])
|
2001-05-10 20:13:17 +02:00
|
|
|
complete();
|
|
|
|
int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR];
|
|
|
|
return isLeapYear(year) ? 366 : 365;
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
case DAY_OF_WEEK_IN_MONTH:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
// This is wrong for the month that contains the gregorian change.
|
|
|
|
int daysInMonth = getActualMaximum(DAY_OF_MONTH);
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
|
2001-05-10 20:13:17 +02:00
|
|
|
// That's black magic, I know
|
|
|
|
return (daysInMonth - (fields[DAY_OF_MONTH] - 1) % 7 + 6) / 7;
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
case WEEK_OF_MONTH:
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
{
|
2001-05-10 20:13:17 +02:00
|
|
|
int daysInMonth = getActualMaximum(DAY_OF_MONTH);
|
|
|
|
int weekday = (daysInMonth - fields[DAY_OF_MONTH]
|
[multiple changes]
2005-02-21 Mark Wielaard <mark@klomp.org>
* gnu/java/locale/LocaleInformation_en.java: Extend
localPatternChars to "GyMdkHmsSEDFwWahKzYeugAZ".
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java
(SimpleDateFormat(String, DateFormatSymbols)): Throw
NullPointerException when formatData is null.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
taking dstSavings into account.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set correct DST_OFFSET to the correct value.
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/util/SimpleTimeZone.java (checkRule): Throw
IllegalArgumentException when month out of range.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2005-02-21 Mark Wielaard <mark@klomp.org>
* java/text/SimpleDateFormat.java (CompiledField.toString):
Use StringBuffer, not StringBuilder.
(toString): Likewise.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Dates should clear to local time.
* java/util/GregorianCalendar.java
(computeTime): Fix priority problem with DAY_OF_WEEK,
Handle non-sunday-startig weeks and minimumDaysInFirstWeek.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(Calendar): Constructor should clear fields.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): Tweak handling of 2-year dates
* java/util/Calendar.java
(clear): Clear fields to correct value.
* java/util/GregorianCalendar.java
(computeTime): Correct handling of time zones.
Correct field minimum values.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(set) Invalidate all fields on first call to set().
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(computeTime): Fixed handling of time zones.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java
(clear): Set values to Epoch instead of zero.
(set): Set isSet to the relevant field pattern instead of just
the field.
* java/util/GregorianCalendar.java
(getBundle): Removed.
(getDayOfYear): Removed.
(getFirstDayOfMonth): New private method.
(nonLeniencyCheck): New private method.
(computeTime): Correct handling of insufficient data.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Invalidate ERA field on setting
the YEAR.
* java/util/SimpleTimeZone.java:
(getDaysInMonth): Reimplemented.
* java/util/GregorianCalendar.java:
(getLinearTime): Removed.
(isLeapYear(int,boolean)): Removed.
(before(), after()): Removed.
(computeTime): Reimplemented.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/Calendar.java: Reformatted.
* java/util/GregorianCalendar.java: Reformatted.
* java/util/SimpleTimeZone.java: Reformatted.
2005-02-21 Sven de Marothy <sven@physto.se>
* java/util/GregorianCalendar.java
(GregorianCalendar): Update fields in the constructor
2005-02-21 Noa Resare <noa@resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
2005-02-21 Noa Resare <address@hidden>
* java/util/Calendar.java(set):
Fix for DST related regression.
2005-02-21 Jeroen Frijters <jeroen@frijters.net>
* java/util/Calendar.java
(setTimeInMillis): Added call to clear, removed computeFields call.
* java/util/Date.java
(Date(int,int,int,int,int,int)): Removed workaround for
GregorianCalendar bug.
* java/util/GregorianCalendar.java
(GregorianCalendar): Chained all constructors to a (new)
common constructor.
(computeTime): Fixed support for lenient month treatment.
(getLinearDay): Return long instead of int.
(calculateDay): Added fields argument and changed day argument
to long.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/DateFormat.java:
Documented pattern character offset constants and
added new ones.
(Field): Added new static fields for new pattern chars.
* java/text/SimpleDateFormat.java:
(CompiledField): Changed name of FieldSizePair class
to CompiledField after adding the character as an
attribute. Changed fields to private and added
accessors to give encapsulation.
(CompiledField.CompiledField(int,int,char)): Extended
with character field.
(CompiledField.getField()): New accessor method.
(CompiledField.getSize()): New acceessor method.
(CompiledField.getCharacter()): New accessor method.
(CompiledField.toString()): Added primarily for debugging.
(standardChars): Now uses extended 24 character sequence.
(compileFormat(String)): Changed to use CompiledField.
(formatWithAttribute(java.util.Date, gnu.java.text.FormatBuffer,
java.text.FieldPosition)): Changed to use CompiledField.
New handler for RFC 822 timezones added.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(parse(String, java.text.ParsePosition)):
Changed 'E' and 'M' cases to use both
short and long names. Extended 'z'
case to also handle 'Z', and deal
with simple GMT offsets such as +0100.
(computeOffset(String)): New private method,
which converts a GMT offset specification,
such as GMT-0500 to a numeric offset in
milliseconds.
* java/util/TimeZone.java:
(timezones()): Added "CEST", the daylight
savings time version of "CET", or Central
European Time.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Set the DST offset to 0 when parsing
GMT offset timezones.
2005-02-21 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java:
(parse): Use offset to set ZONE_OFFSET
rather than the DST_OFFSET, so that
GMT offset timezones change the right
one.
2005-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/SimpleDateFormat.java:
(getDateFormatSymbols()): return a copy
(setDateFormatSymbols(java.text.DateFormatSymbols)):
throw exception on null input
(clone()): implemented to clone
internal fields
2005-02-21 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java
(parse): comparison should be case-insensitive, ignore null
strings.
From-SVN: r95368
2005-02-22 01:58:36 +01:00
|
|
|
+ fields[DAY_OF_WEEK] - SUNDAY) % 7 + SUNDAY;
|
|
|
|
return (daysInMonth + 6 - (7 + weekday - getFirstDayOfWeek()) % 7) / 7;
|
|
|
|
}
|
2001-05-10 20:13:17 +02:00
|
|
|
default:
|
|
|
|
return maximums[field];
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|