TimeZoneRule is an abstract class representing a rule for time zone.
TimeZoneRule has a set of time zone attributes, such as zone name,
raw offset (UTC offset for standard time) and daylight saving time offset.
com.ibm.icu.util.TimeZoneTransition , com.ibm.icu.util.RuleBasedTimeZone
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String | |
| private final int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | TimeZoneRule(String
The time zone name. name, int The UTC offset of its standard time in milliseconds. rawOffset, int The amount of daylight saving offset adjustment in milliseconds.
If this is a rule for standard time, the value of this argument is 0. dstSavings)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The amount of daylight saving offset used by this rule in milliseconds.Gets the amount of daylight saving delta time from the standard time. |
| public abstract Date | Returns: The very last time when this rule takes effect, or null if this rule is applied for future dates infinitely.The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings)Gets the final time when this rule takes effect. |
| public abstract Date | Returns: The very first time when this rule takes effect.The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings)Gets the very first time when this rule takes effect. |
| public String | |
| public abstract Date | Returns: The first time when this rule takes effect after the specified time, or null when this rule never takes effect after the specified time.The first time after this time is returned. base, int The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings, boolean Whether the base time is inclusive or not. inclusive)Gets the first time when this rule takes effect after the specified time. |
| public abstract Date | Returns: The most recent time when this rule takes effect before the specified time, or null when this rule never takes effect before the specified time.The most recent time when this rule takes effect before
this time is returned. base, int The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings, boolean Whether the base time is inclusive or not. inclusive)Gets the most recent time when this rule takes effect before the specified time. |
| public int | Returns: The standard time offset from UTC in milliseconds.Gets the standard time offset. |
| public boolean | Returns: true if the otherTimeZoneRule is the same as this one.The other)TimeZoneRule object to be compared with.Returns if this rule represents the same rule and offsets as another. |
| public abstract boolean | Returns: true if thisTimeZoneRule has one or more start times.Returns if this |
| public String | toString()
Overrides java. String representation of this TimeZoneRule object.
|
| dstSavings | back to summary |
|---|---|
| private final int dstSavings | |
| name | back to summary |
|---|---|
| private final String name | |
| rawOffset | back to summary |
|---|---|
| private final int rawOffset | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| TimeZoneRule | back to summary |
|---|---|
| public TimeZoneRule(String name, int rawOffset, int dstSavings) Constructs a | |
| getDSTSavings | back to summary |
|---|---|
| public int getDSTSavings() Gets the amount of daylight saving delta time from the standard time.
| |
| getFinalStart | back to summary |
|---|---|
| public abstract Date getFinalStart(int prevRawOffset, int prevDSTSavings) Gets the final time when this rule takes effect.
| |
| getFirstStart | back to summary |
|---|---|
| public abstract Date getFirstStart(int prevRawOffset, int prevDSTSavings) Gets the very first time when this rule takes effect. | |
| getName | back to summary |
|---|---|
| public String getName() Gets the name of this time zone. | |
| getNextStart | back to summary |
|---|---|
| public abstract Date getNextStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive) Gets the first time when this rule takes effect after the specified time.
| |
| getPreviousStart | back to summary |
|---|---|
| public abstract Date getPreviousStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive) Gets the most recent time when this rule takes effect before the specified time.
| |
| getRawOffset | back to summary |
|---|---|
| public int getRawOffset() Gets the standard time offset.
| |
| isEquivalentTo | back to summary |
|---|---|
| public boolean isEquivalentTo(TimeZoneRule other) Returns if this rule represents the same rule and offsets as another.
When two
| |
| isTransitionRule | back to summary |
|---|---|
| public abstract boolean isTransitionRule() Returns if this
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a
| |