isLeapYear
Returns true if the given year is a leap year.
A year is a leap year when it is divisible by 4, except century years which must also be divisible by 400.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
year | number | A full year number (e.g. 2024) |
Returns
Section titled “Returns”boolean — true if the year is a leap year
