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

MonthGridtype

The weeks of a month: whole weeks of seven days.

Import it

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

Definition

interface MonthGrid {
    year: number;
    month: number;
    weekStart: WeekStart;
    daysInMonth: number;
    offset: number;
    weeks: MonthDay[][];
}

Members

NameTypeDescription
yearnumber
monthnumber
weekStartWeekStart
daysInMonthnumber
offsetnumber

Cells before the 1st in the first week.

weeksMonthDay[][]

4, 5 or 6 weeks of seven.

Examples

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

const grid: MonthGrid = monthGrid(2026, 11);
console.log(grid.weeks.length, grid.daysInMonth);
5 30

What it prints (run when this page was built)

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