本文へ移動

Koyomi Calendars暦

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

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

目次

リファレンス · /month

MonthDay型

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

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

インポート

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

定義

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

メンバー

名前型説明
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.

例

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 }

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

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

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