@ende/datetime/is-leap

ende add jsr:@ende/datetime

Version 2026.10.15 on JSR.

Exports

  • isLeap — Returns whether the given year is a leap year. Passing in a Date object will return the leap year status of the year of that object and take the current timezone into account. Passing in a number will return the leap year status of that number.
  • isUtcLeap — Returns whether the given year is a leap year in UTC time. This always returns the same value regardless of the local timezone.