Skip to the content

Koyomi Calendars documentation

Koyomi Calendars API: every export

Every export of every entry point, each with its own page. This page keeps the addresses the old one-page reference had.

@johnmorrisdotca/koyomi-calendars/japanese

JapaneseHolidaytype

A Japanese public holiday's name, in Japanese and in English.

oldCalendarDatefunction

The old-calendar date of a Gregorian date, from the new moons and the sun's longitude.

OldDatetype

A date of the old Japanese calendar (旧暦, kyūreki): a month 1 to 12, a day, and whether the month is a leap month.

Rokuyotype

One day of the six-day cycle (六曜, rokuyō): its name, its reading and an English gloss.

ROKUYOconstant

The six days in order of (old month + old day) mod 6, with the reading and an English gloss.

rokuyoOffunction

The day of the six-day cycle (六曜, rokuyō) of a Gregorian date.

@johnmorrisdotca/koyomi-calendars/names

CALENDAR_THEME_ALIASESconstant

The ten names of 0.12 and 0.13, still accepted: each reads as the theme that replaced it.

CALENDAR_YEAR_CLEARconstant

The share of the drawing's width the year keeps clear of the bottom of its zone.

CALENDAR_YEAR_MINconstant

The year is never smaller than this share of the drawing's width (its font size).

@johnmorrisdotca/koyomi-calendars/month

daysInMonthfunction

How many days a month has: leap years by the Gregorian rule (a year divisible by 4, but not by 100 unless by 400).

MONTH_DESIGNSconstant

The four month designs: a wall poster, a memo board, a spiral-bound wall page and a desk pad.

monthCalendarfunction

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

MonthCalendarOptionstype

What monthCalendar takes: the month, the design and the look of one month page.

MonthDaytype

One cell of a month grid: a date, its weekday, and whether it belongs to the month.

monthGridfunction

The weeks of a month: whole weeks of seven, from the week of the 1st to the week of the last day.

MonthGridtype

The weeks of a month: whole weeks of seven days.

WeekStarttype

The first column of a month: "sunday" or "monday".

@johnmorrisdotca/koyomi-calendars/animate

addDaysfunction

The date days after (or before, when negative) date: across months, years and leap days.

CALENDAR_FLIPSconstant

The four ways a page turns: tear-down, fly-up, rip-corner and flip-down.

compareDaysfunction

Which way a turn from one day to another goes.

FLIP_KEYFRAMESconstant

What the sheet does as it goes: from lying on the pad (the first frame) to gone (the last).

flipCalendarfunction

Turns the icon in host from one date to another.

FlipDatetype

A day to show or turn to: a year, a month 1 to 12 and a day of the month.

FlipOptionstype

What flipCalendar takes: how to draw a date, the two dates, and how the page turns.

nextDayfunction

The day after date.

@johnmorrisdotca/koyomi-calendars/themes/pins

calendarIconfunction

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

themeconstant

The pins design's drawing, for the package's own renderer: flat page, red header, two slate pins through white holes.

@johnmorrisdotca/koyomi-calendars/themes/loops

calendarIconfunction

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

themeconstant

The loops design's drawing, for the package's own renderer: grey outline, grey header, three ring pins.

@johnmorrisdotca/koyomi-calendars/themes/shadow

calendarIconfunction

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

themeconstant

The shadow design's drawing, for the package's own renderer: blue header with black coils, a circled day, a long shadow on a lavender tile.

@johnmorrisdotca/koyomi-calendars/themes/heavy

calendarIconfunction

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

themeconstant

The heavy design's drawing, for the package's own renderer: heavy black outline, ring slots over the top edge, black header rule.

@johnmorrisdotca/koyomi-calendars/themes/cartoon

calendarIconfunction

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

themeconstant

The cartoon design's drawing, for the package's own renderer: black cartoon outline, pink header, white ring loops, bold glossy word and number.

@johnmorrisdotca/koyomi-calendars/themes/flip

calendarIconfunction

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

themeconstant

The flip design's drawing, for the package's own renderer: a flip calendar in perspective: coils, a pale header, a slanted number, a fan of pages.

@johnmorrisdotca/koyomi-calendars/themes/stack

calendarIconfunction

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

themeconstant

The stack design's drawing, for the package's own renderer: solid black glyph with a tilted white page, a curled corner and a sheet underneath.

@johnmorrisdotca/koyomi-calendars/themes/line

calendarIconfunction

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

themeconstant

The line design's drawing, for the package's own renderer: black line art, a header rule, four tick marks and a big blue number.

@johnmorrisdotca/koyomi-calendars/themes/curl

calendarIconfunction

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

themeconstant

The curl design's drawing, for the package's own renderer: line art with an orange header, two hooks, thin rounded digits and a curled lower corner.

@johnmorrisdotca/koyomi-calendars/themes/soft

calendarIconfunction

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

themeconstant

The soft design's drawing, for the package's own renderer: flat red-orange header, three amber rings, a cream page with a side shade and a rounded coral number.

@johnmorrisdotca/koyomi-calendars/themes/desk

calendarIconfunction

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

themeconstant

The desk design's drawing, for the package's own renderer: a desk pad seen from an angle: coils, a red banner with a white number, a month of small dates.

@johnmorrisdotca/koyomi-calendars/themes/thin

calendarIconfunction

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

themeconstant

The thin design's drawing, for the package's own renderer: a plain white page, the weekday in red and a very thin number.

@johnmorrisdotca/koyomi-calendars/themes/frame

calendarIconfunction

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

themeconstant

The frame design's drawing, for the package's own renderer: four coloured sides round a pale square with a blue number, a folded corner at the bottom right.

@johnmorrisdotca/koyomi-calendars/themes/badge

calendarIconfunction

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

themeconstant

The badge design's drawing, for the package's own renderer: a white tile and a soft blue page with a light top lip and a white number.

@johnmorrisdotca/koyomi-calendars/themes/sun

calendarIconfunction

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

themeconstant

The sun design's drawing, for the package's own renderer: a square tear-off page: a grey strip to tear off by, a huge black day over a red disc (a slot for any mark), side columns for the weekday, month and holiday.

@johnmorrisdotca/koyomi-calendars/themes/roll

calendarIconfunction

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

themeconstant

The roll design's drawing, for the package's own renderer: a tall wall tear-off page: the pages already torn off curl above, a huge condensed day in the ink of its weekday, side columns, a dotted memo area.

@johnmorrisdotca/koyomi-calendars/themes/squircle

calendarIconfunction

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

themeconstant

The squircle design's drawing, for the package's own renderer: a soft rounded-square tile in a teal-to-blue gradient, a white page with a coloured top band and two binding tabs, a large bold day.

@johnmorrisdotca/koyomi-calendars/themes/plain

calendarIconfunction

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

themeconstant

The plain design's drawing, for the package's own renderer: a plain, unbranded tear-off pad on a kraft stand: a small month, a big day, the weekday in capitals, the month and year, the moon.

@johnmorrisdotca/koyomi-calendars

CALENDAR_HOUSINGSconstant

The housings an icon can sit in: square (the icon alone) and circle (on a coloured disc).

CALENDAR_PRESETSconstant

The named looks: flat, disc, ringed, tilted and disc-ringed.

CALENDAR_THEME_ALIASESconstant

The ten names of 0.12 and 0.13, still accepted: each reads as the theme that replaced it.

CALENDAR_YEAR_CLEARconstant

The share of the drawing's width the year keeps clear of the bottom of its zone.

CALENDAR_YEAR_MINconstant

The year is never smaller than this share of the drawing's width (its font size).

CalendarDatetype

A day on the calendar: a four-digit year, a month 1 to 12 and a day of the month.

calendarIconfunction

An original calendar-page SVG for a month, day and optional year.

CalendarIconOptionstype

What calendarIcon takes: the date, the design and the look of one calendar page.

calendarLayoutfunction

The box, the page and the year's room of a theme, with and without a year.

CalendarLayouttype

Where a theme puts the day and the year; a theme's layout says it once and the drawing and the tests both read it.

CalendarLooktype

The three options a preset sets: a housing, rings and a turn.

calendarMoonfunction

The phase of the moon at noon UTC on a date, in eighths of a lunation: 0 new, 2 first quarter, 4 full, 6 last quarter.

calendarWeekendfunction

The Saturday and the Sunday of the weekend a date is in.

JapaneseHolidaytype

A Japanese public holiday's name, in Japanese and in English.

oldCalendarDatefunction

The old-calendar date of a Gregorian date, from the new moons and the sun's longitude.

OldDatetype

A date of the old Japanese calendar (旧暦, kyūreki): a month 1 to 12, a day, and whether the month is a leap month.

Rokuyotype

One day of the six-day cycle (六曜, rokuyō): its name, its reading and an English gloss.

ROKUYOconstant

The six days in order of (old month + old day) mod 6, with the reading and an English gloss.

rokuyoOffunction

The day of the six-day cycle (六曜, rokuyō) of a Gregorian date.