daysInMonthfunction
The number of days in a month; October 1582 has 21 in the auto calendar, the ten days of the switch being left out.
Import it
import { daysInMonth } from "@johnmorrisdotca/wakusei-planets/time";
Definition
function daysInMonth(year: number, month: number, calendar?: Calendar): number
Parameters
| Name | Type | Description |
|---|---|---|
year | number | The astronomical year. |
month | number | 1 to 12. |
calendar (optional) | Calendar |
|
Returns
number
The days in the month.
Examples
import { daysInMonth } from "@johnmorrisdotca/wakusei-planets/time";
console.log(daysInMonth(2024, 2), daysInMonth(1582, 10));29 21What it prints (run when this page was built)