summaryrefslogtreecommitdiffstats
path: root/libjava/java/util/SimpleTimeZone.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-19 11:01:05 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-19 11:01:05 +0000
commit38c5f6439c177dc05c1f36bad7a88d8518045d22 (patch)
treeec3b080542a4aa34ccef9023d8c207c14ee8a049 /libjava/java/util/SimpleTimeZone.java
parentcd003277a75a4195c98489be7daed21707b74710 (diff)
downloadppe42-gcc-38c5f6439c177dc05c1f36bad7a88d8518045d22.tar.gz
ppe42-gcc-38c5f6439c177dc05c1f36bad7a88d8518045d22.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/SimpleTimeZone.java')
-rw-r--r--libjava/java/util/SimpleTimeZone.java32
1 files changed, 25 insertions, 7 deletions
diff --git a/libjava/java/util/SimpleTimeZone.java b/libjava/java/util/SimpleTimeZone.java
index e777fbd456a..31b85e18972 100644
--- a/libjava/java/util/SimpleTimeZone.java
+++ b/libjava/java/util/SimpleTimeZone.java
@@ -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 @@ public class SimpleTimeZone extends TimeZone
* @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 @@ public class SimpleTimeZone extends TimeZone
*
* @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,7 +511,7 @@ public class SimpleTimeZone extends TimeZone
* 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()
{
@@ -517,6 +519,22 @@ public class SimpleTimeZone extends TimeZone
}
/**
+ * 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;
+ }
+
+ /**
* Returns if this time zone uses daylight savings time.
* @return true, if we use daylight savings time, false otherwise.
*/
OpenPOWER on IntegriCloud