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 · /month

MonthDaytype

One cell of a month grid: a date, its weekday, and whether it belongs to the month.

Import it

import type { MonthDay } from "@johnmorrisdotca/koyomi-calendars/month";

Definition

interface MonthDay {
    year: number;
    month: number;
    day: number;
    weekday: number;
    inMonth: boolean;
}

Members

NameTypeDescription
yearnumber
monthnumber
daynumber
weekdaynumber

0 Sunday to 6 Saturday.

inMonthboolean

False for a day of the month before or after, shown to fill the first and last week.

Examples

import { monthGrid, type MonthDay } from "@johnmorrisdotca/koyomi-calendars/month";

const first: MonthDay = monthGrid(2026, 11).weeks[0]![0]!;
console.log(first);
{ year: 2026, month: 11, day: 1, weekday: 0, inMonth: true }

What it prints (run when this page was built)

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