Debian Codegraph @

time/date/step.ha

raw
1 // SPDX-License-Identifier: MPL-2.0
2 // (c) Hare authors <https://harelang.org>
3
4 // Nominal unitary periods of the Gregorian chronology. Used for chronological
5 // arithmetic.
6 export type step = enum {
7 NANOSECOND = 0b000000001,
8 SECOND = 0b000000010,
9 MINUTE = 0b000000100,
10 HOUR = 0b000001000,
11 DAY = 0b000010000,
12 WEEK = 0b000100000,
13 MONTH = 0b001000000,
14 YEAR = 0b010000000,
15 ERA = 0b100000000,
16
17 // TODO: consider adding NONE=0, ALL=YEAR|MONTH|..., etc
18 // TODO: consider adding ISOWEEKYEAR, ISOWEEK
19 };