| Modifier and Type | Method and Description |
|---|---|
PlainTimestamp |
endLocal()
Obtains the local timestamp of sunset if it exists.
|
Moment |
endUTC()
Obtains the moment of sunset if it exists.
|
boolean |
isAbsent()
Checks if any sunshine is unavailable (polar night).
|
boolean |
isPresent(Moment moment)
Is there any sunshine at given moment?
|
boolean |
isPresent(PlainTimestamp tsp)
Is there any sunshine at given local timestamp?
|
int |
length()
Obtains the length of sunshine in seconds.
|
PlainTimestamp |
startLocal()
Obtains the local timestamp of sunrise if it exists.
|
Moment |
startUTC()
Obtains the moment of sunrise if it exists.
|
String |
toString()
For debugging purposes.
|
public Moment startUTC()
Obtains the moment of sunrise if it exists.
Note: If there is no sunrise but the sun is already above the horizon at the start of day then this method yields the start of day.
IllegalStateException - in case of absent sunshine (polar night)isAbsent()public Moment endUTC()
Obtains the moment of sunset if it exists.
Note: If there is no sunset but the sun is still above the horizon at the end of day then this method yields the end of day.
IllegalStateException - in case of absent sunshine (polar night)isAbsent()public PlainTimestamp startLocal()
Obtains the local timestamp of sunrise if it exists.
Note: If there is no sunrise but the sun is already above the horizon at the start of day then this method yields the start of day.
IllegalStateException - in case of absent sunshine (polar night)isAbsent()public PlainTimestamp endLocal()
Obtains the local timestamp of sunset if it exists.
Note: If there is no sunset but the sun is still above the horizon at the end of day then this method yields the end of day.
IllegalStateException - in case of absent sunshine (polar night)isAbsent()public boolean isPresent(Moment moment)
Is there any sunshine at given moment?
moment - the instant to be queriedpublic boolean isPresent(PlainTimestamp tsp)
Is there any sunshine at given local timestamp?
tsp - the local timestamp to be queriedpublic boolean isAbsent()
Checks if any sunshine is unavailable (polar night).
true if this instance corresponds to a polar night else falsepublic int length()
Obtains the length of sunshine in seconds.
TimeUnit.SECONDSCopyright © 2014–2021. All rights reserved.