Celestine API Documentation - v0.2.0
    Preparing search index...

    Function isLeapYear

    • Check if a year is a leap year

      Leap year rules (Gregorian calendar):

      • Divisible by 4: leap year
      • EXCEPT divisible by 100: not a leap year
      • EXCEPT divisible by 400: leap year

      Examples: 2000 (leap), 1900 (not leap), 2024 (leap), 2100 (not leap)

      Parameters

      • year: number

        Full year number (can be negative for BCE)

      Returns boolean

      true if leap year, false otherwise

      isLeapYear(2000)  // true
      isLeapYear(1900) // false
      isLeapYear(2024) // true