本文へ移動

Koyomi Calendars暦

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

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

目次

リファレンス · /themes/loops

calendarIcon関数

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

Draws the loops calendar page alone: this theme and what it needs, nothing of the other themes.

インポート

import { calendarIcon } from "@johnmorrisdotca/koyomi-calendars/themes/loops";

定義

function calendarIcon(options: Omit<CalendarIconOptions, "theme"> & { theme?: undefined; }): string

引数

名前型説明
optionsOmit<CalendarIconOptions, "theme"> & { theme?: undefined; }

What the main calendarIcon takes, without theme: the date (month, day, year), scheme, housing, rings, size and the rest.

戻り値

string

The icon as SVG text, <svg …>…</svg>.

例

import { calendarIcon } from "@johnmorrisdotca/koyomi-calendars/themes/loops";

const svg = calendarIcon({ month: 11, day: 3, year: 2026, scheme: "dark" });
console.log(svg.startsWith("<svg"));
true

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

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

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