public abstract class DaylightSavingRule
extends java.lang.Object
Defines a yearly pattern when and how there is a switch from winter to summer time and vice versa.
This rule describes when such a switch happens. It also determines
the DST-offset. For every rule instance, a ZonalTransition can
be created just by indicating the appropriate year and standard offset.
The change from winter to summer time and back is usually expressed
by two rule instances.
Note: The term "year" denotes the year in any calendar which is not necessarily the gregorian one. Subclasses need to define the calendar type and some calendar-specific year conversions. If subclasses also want to be serializable then they have to apply the serialization proxy pattern described by Joshua Bloch.
| Modifier and Type | Method and Description |
|---|---|
abstract PlainDate |
getDate(int year)
Determines the date of time switch dependent on given year.
|
OffsetIndicator |
getIndicator()
Yields the offset indicator which must be consulted when interpreting
the date and time of time switch in terms of UTC.
|
int |
getSavings()
Yields the daylight saving amount after the time switch
in seconds.
|
PlainTime |
getTimeOfDay()
Determines the clock time when the switch from winter time to
summer time happens or vice versa.
|
public abstract PlainDate getDate(int year)
Determines the date of time switch dependent on given year.
The result must be interpreted by mean of getIndicator()
in order to calculate the UTC date.
year - reference year when a time switch happensjava.lang.IllegalArgumentException - if given year does not fit to this rulepublic PlainTime getTimeOfDay()
Determines the clock time when the switch from winter time to summer time happens or vice versa.
The result must be interpreted by mean of getIndicator()
in order to calculate the UTC time.
public OffsetIndicator getIndicator()
Yields the offset indicator which must be consulted when interpreting the date and time of time switch in terms of UTC.
public int getSavings()
Yields the daylight saving amount after the time switch in seconds.