本文へ移動

Koyomi Calendars暦

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

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

目次

リファレンス · /month

monthCalendar関数

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

A whole month as an SVG: a wall poster, a memo board, a spiral-bound wall page or a desk pad.

The library knows no holiday: every note on a day is yours to give.

インポート

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

定義

function monthCalendar(options: MonthCalendarOptions): string

引数

名前型説明
optionsMonthCalendarOptions

The year and month, and the look: design, weekStart, locale, scheme, size, notes, tint, outside and mini.

戻り値

string

The page as SVG text, <svg …>…</svg>. It throws a RangeError for a year or month that is out of range.

例

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

const svg = monthCalendar({ year: 2026, month: 11, design: "poster", scheme: "dark" });
console.log(svg.startsWith("<svg"));
true

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

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

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