isLeapYearfunction
Whether a year is a leap year.
Import it
import { isLeapYear } from "@johnmorrisdotca/wakusei-planets/time";
Definition
function isLeapYear(year: number, calendar?: Calendar): boolean
Parameters
| Name | Type | Description |
|---|---|---|
year | number | The astronomical year. |
calendar (optional) | Calendar |
|
Returns
boolean
true for a leap year.
Examples
import { isLeapYear } from "@johnmorrisdotca/wakusei-planets/time";
console.log(isLeapYear(1900), isLeapYear(1900, "julian"), isLeapYear(2000));false true trueWhat it prints (run when this page was built)