public abstract class StartOfDay extends 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.
|
static StartOfDay |
MORNING
Start of calendar day at 06:00 in the morning.
|
| 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 final StartOfDay MORNING
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 timelineIllegalArgumentException - if the argument is out of range -43200 < deviation <= 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 timeCopyright © 2014–2016. All rights reserved.