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

addDaysfunction

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

Import it

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

Definition

function addDays(date: FlipDate, days: number): FlipDate

Parameters

NameTypeDescription
dateFlipDate

The day to start from.

daysnumber

How many days to add; negative goes back.

Returns

FlipDate

The day reached.

Examples

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

console.log(addDays({ year: 2028, month: 2, day: 28 }, 2));
{ year: 2028, month: 3, day: 1 }

What it prints (run when this page was built)

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