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.
What it is for. It is the correction that the replacement gives: replace("calendar", "calendar_fixed") in the console, then each new load of a module that imports calendar gets this module. A process that loaded before keeps what it loaded.
calendar_fixed module with no entry
- Hash
d45383383bae7bc21bbe7f933d0c7e82f80c4f96572cd5930ee9680fffdbf4b1- Size
12288 bytes- Exports
1- Imports
0- Imported by
0- License
- MIT
The days of the months of the Gregorian calendar, with the correction of the module calendar
| Fact | Value |
|---|---|
| Kind | Modules with no entry |
| Source | src/modules/demonstrations/calendar_fixed |
| Boot image | yes: in the boot image, 12288 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
days_in_month(month: Integer, year: Integer) -> Integer | gives the count of days of a month, from 1 to 12, of a year |
days_in_month
days_in_month(month: , year: ) ->
days_in_month gives the count of days of a month, from 1 to 12, of a year. A month out of this range stops the process on a bounds check.
It has the description of the export of calendar, parameter for parameter: that is the condition for a loader to give it in place of calendar. February 2000 has 29 days, February 1900 has 28.
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
Integer wire form
A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.
