本文へ移動

Koyomi Calendars暦

カレンダーのページをSVGで描きます。1日を18種類のアイコンで、1か月をポスターや卓上カレンダーで、そして日めくりも使えます。

「暦」(こよみ) は、カレンダーのことです。 名前について(英語)

目次

リファレンス · /month

MonthCalendarOptions型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

What monthCalendar takes: the month, the design and the look of one month page.

Only year and month are required.

インポート

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

定義

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;
}

メンバー

名前型説明
yearnumber

Four-digit year, 1–9999.

monthnumber

Month 1–12.

design (省略可)"desk" | "poster" | "board" | "wall" | undefined
weekStart (省略可)WeekStart | undefined

The first column: "sunday" (the default) or "monday".

locale (省略可)string | undefined

en (the default) or any locale Intl accepts. Japanese, Chinese and Korean put the year before the month.

scheme (省略可)"light" | "dark" | undefined
size (省略可)number | undefined

Width in CSS pixels. Height follows the design. Default 480.

notes (省略可)Readonly<Record<string, string>> | undefined

A short note for a day, by date ("2026-11-07") or by day of every year ("11-07"). Two lines fit; more is cut. The library knows no holiday: every note is yours.

tint (省略可)boolean | undefined

Saturday blue and Sunday red. Default: on for Japanese, off for any other language.

outside (省略可)boolean | undefined

The days of the months either side, faint, in the first and last row. Default true for wall and desk, false for the others.

mini (省略可)boolean | undefined

A small calendar of the next month (poster and board). Default true for poster.

例

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"));
true

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/koyomi-calendars 0.3.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。