MonthCalendarOptionstype
What monthCalendar takes: the month, the design and the look of one month page.
Only year and month are required.
Import it
import type { MonthCalendarOptions } from "@johnmorrisdotca/koyomi-calendars/month";
Definition
interface MonthCalendarOptions {
year: number;
month: number;
design?: MonthDesign;
weekStart?: WeekStart;
locale?: string;
scheme?: "light" | "dark";
size?: number;
notes?: Readonly<Record<string, string>>;
tint?: boolean;
outside?: boolean;
mini?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
year | number | Four-digit year, 1–9999. |
month | number | Month 1–12. |
design (optional) | "desk" | "poster" | "board" | "wall" | undefined | |
weekStart (optional) | WeekStart | undefined | The first column: |
locale (optional) | string | undefined |
|
scheme (optional) | "light" | "dark" | undefined | |
size (optional) | number | undefined | Width in CSS pixels. Height follows the design. Default 480. |
notes (optional) | Readonly<Record<string, string>> | undefined | A short note for a day, by date ( |
tint (optional) | boolean | undefined | Saturday blue and Sunday red. Default: on for Japanese, off for any other language. |
outside (optional) | boolean | undefined | The days of the months either side, faint, in the first and last row. Default true for |
mini (optional) | boolean | undefined | A small calendar of the next month ( |
Examples
import { monthCalendar, type MonthCalendarOptions } from "@johnmorrisdotca/koyomi-calendars/month";
const options: MonthCalendarOptions = { year: 2026, month: 11, design: "wall", weekStart: "monday", notes: { "2026-11-07": "Dinner" } };
console.log(monthCalendar(options).includes("Dinner"));trueWhat it prints (run when this page was built)