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 · /names

calendarThemeOffunction

Reads a design's name, or an older name for one.

Import it

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

Also exported from: @johnmorrisdotca/koyomi-calendars

Definition

function calendarThemeOf(name: string | null | undefined): CalendarTheme | null

Parameters

NameTypeDescription
namestring | null | undefined

A theme word, in any case, with spaces round it allowed.

Returns

"pins" | "loops" | "shadow" | "heavy" | "cartoon" | "flip" | "stack" | "line" | "curl" | "soft" | "desk" | "thin" | "frame" | "badge" | "sun" | "roll" | "plain" | "squircle" | null

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

Examples

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

console.log(calendarThemeOf(" Squircle "), calendarThemeOf("classic"), calendarThemeOf("nope"));
squircle pins null

What it prints (run when this page was built)

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