Skip to the content

Koyomi Calendars暦

Calendar pages as SVG: a day as an icon in 18 original designs, a whole month as a poster or a desk pad, and the page turning from one day to the next.

Koyomi is the Japanese word 暦 for the calendar. About the name

Contents

Reference · Calendar icons

calendarPresetOffunction

Reads a preset's name.

Import it

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

Definition

function calendarPresetOf(name: string | null | undefined): CalendarPreset | null

Parameters

NameTypeDescription
namestring | null | undefined

A preset word, in any case.

Returns

"flat" | "disc" | "ringed" | "tilted" | "disc-ringed" | null

The preset, or null when the word is not one of ours.

Examples

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

console.log(calendarPresetOf("Disc"), calendarPresetOf("nope"));
disc null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/koyomi-calendars 0.3.0.