Top Description Fields Constructors Methods
com.ibm.icu.util

public Class InitialTimeZoneRule

extends TimeZoneRule
Class Inheritance
Imports
java.util.Date

InitialTimeZoneRule represents a time zone rule representing a time zone effective from the beginning and has no actual start times.
ICU Status
Stable since ICU 3.8.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
InitialTimeZoneRule(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 ia a rule for standard time, the value of this argument is 0.
dstSavings
)

Constructs a InitialTimeZoneRule with the name, the GMT offset of its standard time and the amount of daylight saving offset adjustment.

Method Summary

Modifier and TypeMethod and Description
public Date
getFinalStart(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
)

Implements abstract com.ibm.icu.util.TimeZoneRule.getFinalStart.

Gets the final time when this rule takes effect.
public Date
getFirstStart(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
)

Implements abstract com.ibm.icu.util.TimeZoneRule.getFirstStart.

Gets the very first time when this rule takes effect.
public Date
getNextStart(long
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
)

Implements abstract com.ibm.icu.util.TimeZoneRule.getNextStart.

Gets the first time when this rule takes effect after the specified time.
public Date
getPreviousStart(long
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
)

Implements abstract com.ibm.icu.util.TimeZoneRule.getPreviousStart.

Gets the most recent time when this rule takes effect before the specified time.
public boolean
isEquivalentTo(TimeZoneRule
The TimeZoneRule object to be compared with.
other
)

Overrides com.ibm.icu.util.TimeZoneRule.isEquivalentTo.

Returns if this rule represents the same rule and offsets as another.
public boolean
isTransitionRule()

Implements abstract com.ibm.icu.util.TimeZoneRule.isTransitionRule.

Returns if this TimeZoneRule has one or more start times.
Inherited from com.ibm.icu.util.TimeZoneRule:
getDSTSavingsgetNamegetRawOffsettoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.ibm.icu.util.TimeZoneRule.serialVersionUID.

Constructor Detail

InitialTimeZoneRuleback to summary
public InitialTimeZoneRule(String name, int rawOffset, int dstSavings)

Constructs a InitialTimeZoneRule with the name, the GMT offset of its standard time and the amount of daylight saving offset adjustment.

Parameters
name:String

The time zone name.

rawOffset:int

The UTC offset of its standard time in milliseconds.

dstSavings:int

The amount of daylight saving offset adjustment in milliseconds. If this ia a rule for standard time, the value of this argument is 0.

ICU Status
Stable since ICU 3.8.

Method Detail

getFinalStartback to summary
public Date getFinalStart(int prevRawOffset, int prevDSTSavings)

Implements abstract com.ibm.icu.util.TimeZoneRule.getFinalStart.

Doc from com.ibm.icu.util.TimeZoneRule.getFinalStart.

Gets the final time when this rule takes effect.

Note: This method in InitialTimeZoneRule always returns null.

Parameters
prevRawOffset:int

The standard time offset from UTC before this rule takes effect in milliseconds.

prevDSTSavings:int

The amount of daylight saving offset from the standard time.

Returns:Date

The very last time when this rule takes effect, or null if this rule is applied for future dates infinitely.

Annotations
@Override
ICU Status
Stable since ICU 3.8.
getFirstStartback to summary
public Date getFirstStart(int prevRawOffset, int prevDSTSavings)

Implements abstract com.ibm.icu.util.TimeZoneRule.getFirstStart.

Doc from com.ibm.icu.util.TimeZoneRule.getFirstStart.

Gets the very first time when this rule takes effect.

Note: This method in InitialTimeZoneRule always returns null.

Parameters
prevRawOffset:int

The standard time offset from UTC before this rule takes effect in milliseconds.

prevDSTSavings:int

The amount of daylight saving offset from the standard time.

Returns:Date

The very first time when this rule takes effect.

Annotations
@Override
ICU Status
Stable since ICU 3.8.
getNextStartback to summary
public Date getNextStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive)

Implements abstract com.ibm.icu.util.TimeZoneRule.getNextStart.

Doc from com.ibm.icu.util.TimeZoneRule.getNextStart.

Gets the first time when this rule takes effect after the specified time.

Note: This method in InitialTimeZoneRule always returns null.

Parameters
base:long

The first time after this time is returned.

prevRawOffset:int

The standard time offset from UTC before this rule takes effect in milliseconds.

prevDSTSavings:int

The amount of daylight saving offset from the standard time.

inclusive:boolean

Whether the base time is inclusive or not.

Returns:Date

The first time when this rule takes effect after the specified time, or null when this rule never takes effect after the specified time.

Annotations
@Override
ICU Status
Stable since ICU 3.8.
getPreviousStartback to summary
public Date getPreviousStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive)

Implements abstract com.ibm.icu.util.TimeZoneRule.getPreviousStart.

Doc from com.ibm.icu.util.TimeZoneRule.getPreviousStart.

Gets the most recent time when this rule takes effect before the specified time.

Note: This method in InitialTimeZoneRule always returns null.

Parameters
base:long

The most recent time when this rule takes effect before this time is returned.

prevRawOffset:int

The standard time offset from UTC before this rule takes effect in milliseconds.

prevDSTSavings:int

The amount of daylight saving offset from the standard time.

inclusive:boolean

Whether the base time is inclusive or not.

Returns:Date

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.

Annotations
@Override
ICU Status
Stable since ICU 3.8.
isEquivalentToback to summary
public boolean isEquivalentTo(TimeZoneRule other)

Overrides com.ibm.icu.util.TimeZoneRule.isEquivalentTo.

Doc from com.ibm.icu.util.TimeZoneRule.isEquivalentTo.

Returns if this rule represents the same rule and offsets as another. When two TimeZoneRule objects differ only its names, this method returns true.

Parameters
other:TimeZoneRule

The TimeZoneRule object to be compared with.

Returns:boolean

true if the other TimeZoneRule is the same as this one.

Annotations
@Override
ICU Status
Stable since ICU 3.8.
isTransitionRuleback to summary
public boolean isTransitionRule()

Implements abstract com.ibm.icu.util.TimeZoneRule.isTransitionRule.

Doc from com.ibm.icu.util.TimeZoneRule.isTransitionRule.

Returns if this TimeZoneRule has one or more start times.

Note: This method in InitialTimeZoneRule always returns false.

Returns:boolean

true if this TimeZoneRule has one or more start times.

Annotations
@Override
ICU Status
Stable since ICU 3.8.