API Reference › Date › Date.days_in_month
method

Date.days_in_month

Date.days_in_month(year, month) -> int

The number of days in month of year (28–31), accounting for leap Februaries.

Example

program Demo {
  handler Step phase Update {
    let n = Date.days_in_month(2024, 2)   # 29
  }
}
← All symbols