public abstract class StartOfDay
extends java.lang.Object
Defines the start of a given calendar day relative to midnight in seconds.
Specification: All subclasses must be immutable.
| Modifier and Type | Field and Description |
|---|---|
static StartOfDay |
EVENING
Start of calendar day at 18:00 on previous day.
|
static StartOfDay |
MIDNIGHT
Default start of calendar day at midnight.
|
| Modifier and Type | Method and Description |
|---|---|
abstract int |
getDeviation(Calendrical<?,?> calendarDay,
TZID tzid)
Yields the start of given calendar day relative to midnight in seconds.
|
static StartOfDay |
ofFixedDeviation(int deviation)
Liefert the start of given calendar day relative to midnight in fixed seconds.
|
public static final StartOfDay MIDNIGHT
public static final StartOfDay EVENING
public static StartOfDay ofFixedDeviation(int deviation)
Liefert the start of given calendar day relative to midnight in fixed seconds.
A negative deviation is explicitly allowed and refers to the previous calendar day.
deviation - the deviation of start of day relative to midnight in seconds on the local timelinejava.lang.IllegalArgumentException - if the absolute amount of deviation is bigger than or equal to 43200public abstract int getDeviation(Calendrical<?,?> calendarDay, TZID tzid)
Yields the start of given calendar day relative to midnight in seconds.
calendarDay - calendar daytzid - timezone identifier, helps to resolve an UTC-event like sunset to a local time