Kosmorrolib Documentation

MoonPhase

An object representing a Moon phase

Synopsis

class MoonPhase:
    phase_type: MoonPhaseType
    time: Union[datetime|None]
    next_phase_date: datetime

    def get_next_phase() -> MoonPhaseType

Properties

  • phase_type: one of the values of the MoonPhaseType enumeration
  • time: the time at which the Moon phase happens (only set for New Moon, First Quarter, Full Moon and Last Quarter)
  • next_phase_date: the time when the next phase happens

Methods

get_next_phase() -> MoonPhaseType

Return the type of the following Moon phase.

serialize()

Returns the object as a plain simple Python dictionnary.

See also

Help us to improve this page, contribute to the documentation!