Moon rules
MOON(...) is a rule expression you can use in a Calendite recurrence rule to schedule an event
by lunar phase. See the rule reference for the surrounding syntax.
Format:
MOON({phaseOrNumberOrRange})
MOON({phaseOrNumberOrRange}, {half})
Supported phase values
NEW
WAXING_CRESCENT
FIRST_QUARTER
WAXING_GIBBOUS
FULL
WANING_GIBBOUS
LAST_QUARTER
WANING_CRESCENT
Named phases represent the exact date of that moon phase.
Examples:
MOON(FULL)
MOON(NEW)
MOON(FIRST_QUARTER)
MOON(LAST_QUARTER)
Number values
A number represents moon illumination as a percentage.
MOON(0)
MOON(50)
MOON(100)
Examples:
MOON(0) = new moon
MOON(100) = full moon
MOON(50) = 50% illumination, waxing or waning
For numbers between 1 and 99, the rule may match twice in a lunar cycle: once while the moon is waxing and once while it is waning.
Range values
A range represents an illumination range.
MOON({start}..{end})
Examples:
MOON(95..100)
MOON(25..50)
MOON(0..10)
Meaning:
MOON(95..100)
matches dates where the moon illumination is between 95% and 100%.
Half values
The optional second argument controls which half of the lunar cycle should be matched.
Supported values:
WAXING
WANING
BOTH
FIRST_HALF
SECOND_HALF
Aliases:
WAXING = FIRST_HALF
WANING = SECOND_HALF
BOTH = default
Examples:
MOON(50, WAXING)
MOON(50, WANING)
MOON(50, BOTH)
MOON(95..100, WAXING)
MOON(95..100, WANING)
MOON(95..100, BOTH)
Meaning:
MOON(50, WAXING)
matches the 50% illuminated moon during the first half of the lunar cycle.
MOON(50, WANING)
matches the 50% illuminated moon during the second half of the lunar cycle.
MOON(95..100, WAXING)
matches dates where the moon is between 95% and 100% illuminated while waxing.
MOON(95..100, WANING)
matches dates where the moon is between 95% and 100% illuminated while waning.
Behaviour with named phases and half values
When using a named phase, the half value is allowed but not needed.
These are equivalent:
MOON(FULL)
MOON(FULL, BOTH)
MOON(FULL, WAXING)
MOON(FULL, WANING)
They all mean:
the exact full moon date
The half argument only affects number and range rules.
Examples
MOON(FULL)
The exact full moon date.
MOON(100)
The exact full moon date.
MOON(95..100)
Any date where the moon is between 95% and 100% illuminated, either waxing or waning.
MOON(95..100, WAXING)
Any date where the moon is between 95% and 100% illuminated during the waxing half of the lunar cycle.
MOON(95..100, WANING)
Any date where the moon is between 95% and 100% illuminated during the waning half of the lunar cycle.
MOON(50)
Any date where the moon is 50% illuminated, either waxing or waning.
MOON(50, WAXING)
The waxing 50% moon.
MOON(50, WANING)
The waning 50% moon.