After doing a bunch of work to make getOffset work correctly with the various
combinations of positive and negative values, I looked more carefully at the
docs, and tried against the Sun jvm. Apparently, day and day of month have to
be positive and refer to the same day, which is different from the whay rules
are specified.
So given that, I fixed up the matching mauve test, and this patch fixes up
major issues. It also bumps the serial version and initializes the time mode
variables.
There is still the issue that if weekday on or before/after mode refers to a
day outside the nominal month, getOffset won't work right. PR 15560.
2004-05-21 Jerry Quinn <jlquinn@optonline.net>
PR libgcj/8321
* java/util/SimpleTimeZone.java (serialVersionOnStream): Bump to 2.
(setStartRule,setEndRule): Don't take abs of day number.
(getOffset): Clarify docs. Add argument checks.
(isBefore): Take abs of day number in DOW_LE_DOM_MODE.
(equals,hasSameRules,toString,readObject): Use startTimeMode and
endTimeMode.
* testsuite/libjava.mauve/xfails
(gnu.testlet.java.util.SimpleTimeZone.check12): XFAIL test 22.