public interface StartOfDay
Defines the start of a calendar day.
Background is the fact that some calendar systems start calendar days at another time than midnight. For example the islamic calendars start the day at sunset on previous day.
| Modifier and Type | Field and Description |
|---|---|
static StartOfDay |
MIDNIGHT
The calendar day starts at midnight.
|
static final StartOfDay MIDNIGHT
The calendar day starts at midnight.
This setting is valid for all ISO-8601-systems by default. An exception are certain timezones where days might start later than midnight due to daylight-saving-change, for example in Brazil.
int getShift(long epochDays)
Queries the start time of given calendar day in seconds relative to midnight (UTC).
Example: In Israel the legal hebrew calendar day starts at
6 PM on previous day, so the shift is negative with the value
-6 * 60 * 60. In a religious context the concrete time
of sunset is important so the given argument can be used to
calculate the season-dependent position of the sun.
epochDays - count of days relative to UTC epoch [1972-01-01]boolean isFixed()
Queries if the start of a calendar day always happens at the same time.
true if the day always starts at the same wall time
else falseCopyright © 2014. All rights reserved.