modus
Menu

The module calendar_fixed

The days of the months of the Gregorian calendar, with the correction of the module calendar.

The module calendar forgets the rule of the 400 years. This module has the same export with the same description, and the correct rule: a leap year is a year that 4 divides, except a year that 100 divides and 400 does not. A replacement {calendar, calendar_fixed} gives this module to each module that imports calendar, with no new build of that module.

FactValue
Sourcemodules/calendar_fixed
Boot imagein the boot image; the image is not built, so its size is not known
Importsnone
Imported bynone

Exports

ExportWhat it does
days_in_month(month: Integer, year: Integer) -> Integergives the count of days of a month, from 1 to 12, of a year

Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).