Class LunarTime.Moonlight

java.lang.Object
net.time4j.calendar.astro.LunarTime.Moonlight
Enclosing class:
LunarTime

public static class LunarTime.Moonlight extends Object

Collects all moon presence data for a given calendar date and zone of observer.

Since:
3.38/4.33
Author:
Meno Hochschild
  • Method Details

    • moonrise

      public Optional<Moment> moonrise()

      Obtains the moment of moonrise if it exists.

      Returns:
      moment of moonrise
    • moonriseLocal

      public Optional<PlainTimestamp> 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

      public Optional<PlainTimestamp> moonrise(TZID tzid)

      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

      public Optional<Moment> moonset()

      Obtains the moment of moonset if it exists.

      Returns:
      moment of moonset (exclusive)
    • moonsetLocal

      public Optional<PlainTimestamp> 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

      public Optional<PlainTimestamp> moonset(TZID tzid)

      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

      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.

      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 else false
    • 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 else false
    • 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

      public String toString()

      For debugging purposes.

      Overrides:
      toString in class Object
      Returns:
      String