| Modifier and Type | Method and Description |
|---|---|
boolean |
isAbsent()
Checks if the moon is always below the horizon.
|
boolean |
isPresent(Moment moment)
Is the moon above the horizon at given moment?
|
boolean |
isPresentAllDay()
Checks if the moon is always above the horizon.
|
int |
length()
Obtains the length of moonlight in seconds.
|
Optional<Moment> |
moonrise()
Obtains the moment of moonrise if it exists.
|
Optional<PlainTimestamp> |
moonrise(TZID tzid)
Obtains the timestamp of moonrise in given timezone if it exists.
|
Optional<PlainTimestamp> |
moonriseLocal()
Obtains the timestamp of moonrise in the local observer timezone if it exists.
|
Optional<Moment> |
moonset()
Obtains the moment of moonset if it exists.
|
Optional<PlainTimestamp> |
moonset(TZID tzid)
Obtains the timestamp of moonset in given timezone if it exists.
|
Optional<PlainTimestamp> |
moonsetLocal()
Obtains the timestamp of moonset in the local observer timezone if it exists.
|
String |
toString()
For debugging purposes.
|
public Optional<Moment> moonrise()
Obtains the moment of moonrise if it exists.
public Optional<PlainTimestamp> moonriseLocal()
Obtains the timestamp of moonrise in the local observer timezone if it exists.
LunarTime.ofLocation(TZID)public Optional<PlainTimestamp> moonrise(TZID tzid)
Obtains the timestamp of moonrise in given timezone if it exists.
tzid - timezone identifier (which maybe deviates from local observer timezone)public Optional<Moment> moonset()
Obtains the moment of moonset if it exists.
public Optional<PlainTimestamp> moonsetLocal()
Obtains the timestamp of moonset in the local observer timezone if it exists.
LunarTime.ofLocation(TZID)public Optional<PlainTimestamp> moonset(TZID tzid)
Obtains the timestamp of moonset in given timezone if it exists.
tzid - timezone identifier (which maybe deviates from local observer timezone)public boolean isPresent(Moment moment)
Is the moon above the horizon at given moment?
Keep in mind that the moon can even be invisible (New Moon) if it is above the horizon.
moment - the instant to be queriedpublic boolean isPresentAllDay()
Checks if the moon is always above the horizon.
Keep in mind that the moon can even be invisible (New Moon) if it is above the horizon.
true if the moon is always above the horizon else falsepublic boolean isAbsent()
Checks if the moon is always below the horizon.
Keep in mind that the moon can even be invisible (New Moon) if it is above the horizon.
true if the moon is always below the horizon else falsepublic int length()
Obtains the length of moonlight in seconds.
Note: This method ignores the phase of moon.
TimeUnit.SECONDSCopyright © 2014–2021. All rights reserved.