Update temporal handling for DCAT-US v3.0 PeriodOfTime object
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 200
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 5
Description
**What:** DCAT-US v3.0 `temporal` is a PeriodOfTime object with `startDate` and optionally `endDate`. The v1.1 format was a slash-separated string (e.g., `2019-01/2020-12`). ISO records produce temporal via MDTranslator in an unknown format (to be confirmed by SPIKE-2 and SPIKE-5).
**Likely scope:**
- Add a temporal normalization step that converts:
- v1.1 slash-separated string -> PeriodOfTime object
- ISO GML TimePeriod output (from MDTranslator) -> PeriodOfTime object
- Already-valid PeriodOfTime object -> pass through
- This step should run as part of the `dcat_convert.py` logic or as a post-MDTranslator fixup, not as a change to MDTranslator itself
- Handle the edge case where only `startDate` is present (`endDate` is optional in v3.0)
- Handle ISO temporal values that use year-month format (e.g., `2020-05`) rather than full ISO 8601 dates
**Done When:**
- v3.0 records with PeriodOfTime `temporal` pass validation
- v1.1 slash-separated temporal strings are correctly converted
- ISO-sourced temporal values are correctly converted
- Records with no temporal value are unaffected
**Notes:**
- v3.0 PeriodOfTime definition: [github.com/GSA/dcat-us/blob/main/jsonschema/definitions/PeriodOfTime.json](https://github.com/GSA/dcat-us/blob/main/jsonschema/definitions/PeriodOfTime.json)
- The Census concity record has temporal `beginPosition 2020-05`, `endPosition 2020-05` (year-month, not full date) -- this edge case must be handled
Contributor guide
Assessment
This issue has not been assessed yet.