Description
Parse a Gregorian ordinal-date token.
Civil calendar arithmetic needs explicit year numbering, leap rules and index origins. A weekday mask or Gregorian component operation does not identify a timezone, working calendar or historical calendar reform.
Parse a Gregorian ordinal-date token.
When to use this tool
Use Date: Ordinal Date Field Split when checking the stated weekday or Gregorian calendar convention.
How to use the tool and how it works
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Parse a Gregorian ordinal-date token. Require YYYY-DDD, year 1-9999 and day within 365 or 366 according to the Gregorian leap rule; return numeric year and dayOfYear.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Token | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned object; expand its named members below. | Required. Object. |
| result.year | Year | Calculated result member: number. |
| result.dayOfYear | Day Of Year | Calculated result member: number. |
{
"input": {
"token": "2024-060"
},
"output": {
"result": {
"year": 2024,
"dayOfYear": 60
}
}
} Limitations and assumptions
- This is a restricted token parser, not ISO week-date parsing or a historical calendar conversion.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use an appropriate full calendar library and authoritative local rules when business days, historical dates or real scheduling matter.
References
Similar or alternative tools
- Ordinal Day Leap Boundary Crosswalk
Convert a bounded Gregorian ordinal day to a civil date.
- Calendar Month Ordinal Serial Pair
Return a serial month coordinate.