isLeapYear
Check if a year is a leap year.
isLeapYear()
Checks if the current year is a leap year.
Note
- A year is a leap year if it is divisible by 4.
- However, years divisible by 100 are not leap years unless they are also divisible by 400.
- For example:
2000,2020,2400→ leap years ✅1900,2100→ not leap years ❌
Signature
isLeapYear(year?: number): booleanParameters
year (optional): The year to check. If omitted, the method uses the year from the current Chronos instance.
Return Value
boolean — Returns true if the year is a leap year, otherwise false.
Example Usage
playground.ts
Last updated: Thu, May 21, 2026 05:51:00AM (UTC)
