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;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
year | number | Four-digit year, 1–9999. |
month | number | Month 1–12. |
design (省略可) | "desk" | "poster" | "board" | "wall" | undefined | |
weekStart (省略可) | WeekStart | undefined | The first column: |
locale (省略可) | string | undefined |
|
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 ( |
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 |
mini (省略可) | boolean | undefined | A small calendar of the next month ( |
例
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。