Skip to the content

Koyomi Calendars暦

Calendar pages as SVG: a day as an icon in 18 original designs, a whole month as a poster or a desk pad, and the page turning from one day to the next.

Koyomi is the Japanese word 暦 for the calendar. About the name

Contents

Reference · Calendar icons

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

NameTypeDescription
yearnumber

Four-digit year.

monthnumber

Month 1 to 12.

daynumber

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));
6

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/koyomi-calendars 0.3.0.