Skip to content

Latest commit

 

History

History
23 lines (22 loc) · 1.04 KB

MoonPeriods.md

File metadata and controls

23 lines (22 loc) · 1.04 KB

MoonPeriods

A Moon period is the period when the angular distance between the Moon and the Sun (with the vertex being the Earth) is positive or negative. When it is negative it is called a Waning Moon period (from Full Moon to New Moon), when it is positive it is called a Waxing Moon period (from New Moon to Full Moon).

You can obtain a MoonPeriods collection from a SynodicRhythm object. It contains MoonPeriod instances.

/** @var \MarcoConsiglio\Ephemeris\Rhythms\SynodicRhythm $synodic_rhythm */
/** @var \MarcoConsiglio\Ephemeris\Rhythms\MoonPeriods $moon_periods */
$moon_periods = $synodic_rhythm->getPeriods();

MoonPeriod

A MoonPeriod object can tell you when the period start, stop and if it is waning or waxing.

foreach($moon_periods as $period) {
    $type = "unknown";
    if ($period->isWaxing()) {
        $type = "waxing";
    }
    if ($period->isWaning()) {
        $type = "waning";
    }
    echo "There is a $type moon period starting from {$period->start} to {$period->end}.\n";
}