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
| Name | Type | Description |
|---|---|---|
date | FlipDate | The day to start from. |
days | number | 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)