This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Patch: java.util.SimpleTimeZone
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 19 Dec 2003 12:05:27 +0100
- Subject: FYI: Patch: java.util.SimpleTimeZone
Hi list,
I commited the attached patch to add a simple method in
java.util.SimpleTimeZone and fix some other little things.
Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2463
diff -u -b -B -r1.2463 ChangeLog
--- ChangeLog 19 Dec 2003 09:59:15 -0000 1.2463
+++ ChangeLog 19 Dec 2003 10:58:13 -0000
@@ -1,5 +1,13 @@
2003-12-19 Michael Koch <konqueror@gmx.de>
+ * java/util/SimpleTimeZone.java
+ (setStartRule): Reformated documentation.
+ (setEndRule): Reworked documentation.
+ (getDSTSavings): Fixed @since tag.
+ (setDSTSavings): New method.
+
+2003-12-19 Michael Koch <konqueror@gmx.de>
+
* java/text/NumberFormat.java: Sorted imports.
(getCurrency): New method.
(setCurrency): New method.
Index: java/util/SimpleTimeZone.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/SimpleTimeZone.java,v
retrieving revision 1.9
diff -u -b -B -r1.9 SimpleTimeZone.java
--- java/util/SimpleTimeZone.java 21 Jun 2003 12:49:39 -0000 1.9
+++ java/util/SimpleTimeZone.java 19 Dec 2003 10:58:13 -0000
@@ -1,5 +1,5 @@
/* java.util.SimpleTimeZone
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -390,7 +390,8 @@
* @param dayOfWeek The day of week where daylight savings start.
* @param time The time in milliseconds standard time where daylight
* savings start.
- * @see SimpleTimeZone */
+ * @see SimpleTimeZone
+ */
public void setStartRule(int month, int day, int dayOfWeek, int time)
{
this.startMode = checkRule(month, day, dayOfWeek);
@@ -411,11 +412,12 @@
*
* @param rawOffset The time offset from GMT.
* @param id The identifier of this time zone.
- * @param Month The end month of daylight savings.
+ * @param month The end month of daylight savings.
* @param day A day in month, or a day of week in month.
- * @param DayOfWeek A day of week, when daylight savings ends.
- * @param Time A time in millis in standard time.
- * @see #setStartRule */
+ * @param dayOfWeek A day of week, when daylight savings ends.
+ * @param time A time in millis in standard time.
+ * @see #setStartRule
+ */
public void setEndRule(int month, int day, int dayOfWeek, int time)
{
this.endMode = checkRule(month, day, dayOfWeek);
@@ -509,11 +511,27 @@
* is one hour, but for some time zones this may be half an our.
* @return the daylight savings offset in milliseconds.
*
- * @since JDK1.2
+ * @since 1.2
*/
public int getDSTSavings()
{
return dstSavings;
+ }
+
+ /**
+ * Sets the daylight savings offset. This is a positive offset in
+ * milliseconds with respect to standard time.
+ *
+ * @param dstSavings the daylight savings offset in milliseconds.
+ *
+ * @since 1.2
+ */
+ public void setDSTSavings(int dstSavings)
+ {
+ if (dstSavings <= 0)
+ throw new IllegalArgumentException("illegal value for dstSavings");
+
+ this.dstSavings = dstSavings;
}
/**