Class LunarTime.Moonlight
- Enclosing class:
- LunarTime
Collects all moon presence data for a given calendar date and zone of observer.
- Since:
- 3.38/4.33
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isAbsent()
Checks if the moon is always below the horizon.boolean
Is the moon above the horizon at given moment?boolean
Checks if the moon is always above the horizon.int
length()
Obtains the length of moonlight in seconds.moonrise()
Obtains the moment of moonrise if it exists.Obtains the timestamp of moonrise in given timezone if it exists.Obtains the timestamp of moonrise in the local observer timezone if it exists.moonset()
Obtains the moment of moonset if it exists.Obtains the timestamp of moonset in given timezone if it exists.Obtains the timestamp of moonset in the local observer timezone if it exists.toString()
For debugging purposes.
-
Method Details
-
moonrise
Obtains the moment of moonrise if it exists.
- Returns:
- moment of moonrise
-
moonriseLocal
Obtains the timestamp of moonrise in the local observer timezone if it exists.
- Returns:
- local timestamp of moonrise
- See Also:
LunarTime.ofLocation(TZID)
-
moonrise
Obtains the timestamp of moonrise in given timezone if it exists.
- Parameters:
tzid
- timezone identifier (which maybe deviates from local observer timezone)- Returns:
- zonal timestamp of moonrise
-
moonset
Obtains the moment of moonset if it exists.
- Returns:
- moment of moonset (exclusive)
-
moonsetLocal
Obtains the timestamp of moonset in the local observer timezone if it exists.
- Returns:
- local timestamp of moonset
- See Also:
LunarTime.ofLocation(TZID)
-
moonset
Obtains the timestamp of moonset in given timezone if it exists.
- Parameters:
tzid
- timezone identifier (which maybe deviates from local observer timezone)- Returns:
- zonal timestamp of moonset
-
isPresent
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.
- Parameters:
moment
- the instant to be queried- Returns:
- boolean
-
isPresentAllDay
public 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.
- Returns:
true
if the moon is always above the horizon elsefalse
-
isAbsent
public 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.
- Returns:
true
if the moon is always below the horizon elsefalse
-
length
public int length()Obtains the length of moonlight in seconds.
Note: This method ignores the phase of moon.
- Returns:
- physical length of moonlight in seconds (without leap seconds)
- See Also:
TimeUnit.SECONDS
-
toString
For debugging purposes.
-