calendarMoonfunction
The phase of the moon at noon UTC on a date, in eighths of a lunation: 0 new, 2 first quarter, 4 full, 6 last quarter.
A mean lunation from a known new moon, so it can be a day out near the turn of a phase.
Import it
import { calendarMoon } from "@johnmorrisdotca/koyomi-calendars";
Definition
function calendarMoon(year: number, month: number, day: number): number
Parameters
| Name | Type | Description |
|---|---|---|
year | number | Four-digit year. |
month | number | Month 1 to 12. |
day | number | Day of the month. |
Returns
number
A whole number 0 to 7.
Examples
import { calendarMoon } from "@johnmorrisdotca/koyomi-calendars";
console.log(calendarMoon(2026, 11, 3));6What it prints (run when this page was built)