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

    Function daysInMonth

    • Get the number of days in a given month

      Takes leap years into account for February.

      Parameters

      • year: number

        Full year number

      • month: number

        Month (1-12, where 1 = January)

      Returns number

      Number of days in the month (28-31), or 0 if month is invalid

      daysInMonth(2024, 2)   // 29 (leap year)
      daysInMonth(2023, 2) // 28 (not leap year)
      daysInMonth(2024, 4) // 30 (April)