Chrononuensis provides a set of predefined structures for parsing and representing date-based information. Each structure has:
- A default format used for parsing.
- A list of components extracted from the input.
Generated structures and parsers
Each structure in this list has a public parser with the same name followed by Parser. With the exception of MonthDay, these structures implement IPeriod. MonthDay is parsable but does not represent a continuous time span because it does not include a year.
MonthDay
Default Format: MM-dd
| Component | Type | Min | Max |
|---|---|---|---|
| Month | int |
1 | 12 |
| Day | int |
1 | N/A |
YearDay
Default Format: yyyy-jjj
| Component | Type | Min | Max |
|---|---|---|---|
| Year | int |
N/A | N/A |
| DayOfYear | int |
1 | N/A |
YearWeek
Default Format: yyyy-'W'ww
| Component | Type | Min | Max |
|---|---|---|---|
| Year | int |
N/A | N/A |
| Week | int |
1 | N/A |
YearMonth
Default Format: yyyy-MM
| Component | Type | Min | Max |
|---|---|---|---|
| Year | int |
N/A | N/A |
| Month | int |
1 | 12 |
YearQuarter
Default Format: yyyy-'Q'q
| Component | Type | Min | Max |
|---|---|---|---|
| Year | int |
N/A | N/A |
| Quarter | int |
1 | 4 |
YearSemester
Default Format: yyyy-'H'S
| Component | Type | Min | Max |
|---|---|---|---|
| Year | int |
N/A | N/A |
| Semester | int |
1 | 2 |
Year
Default Format: yyyy
| Component | Type | Min | Max |
|---|---|---|---|
| Year | int |
N/A | N/A |
Olympiad
Default Format: {o:RN} {#Olympiad}
| Component | Type | Min | Max |
|---|---|---|---|
| Olympiad | int |
1 | 40 |
Decade
Default Format: tttt's'
| Component | Type | Min | Max |
|---|---|---|---|
| Decade | int |
N/A | N/A |
Century
Default Format: c
| Component | Type | Min | Max |
|---|---|---|---|
| Century | int |
N/A | N/A |
Hand-written period structure
CustomPeriod implements IPeriod for an arbitrary inclusive range between two DateOnly values. It does not have a matching parser or a default format.