Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow EDTF date to refine basic date with time #220

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

1ec5
Copy link
Member

@1ec5 1ec5 commented Jun 15, 2024

If a start_date or end_date has been qualified to the fullest extent possible (down to the day), treat it as a daylong range in EDTF when comparing it to the start_date:edtf or end_date:edtf tag, and compare it both ways to see if there’s any overlap.

Originally, I wanted to just append TXX:XX to the basic date, but either EDTF.js or the EDTF specification apparently doesn’t allow unspecified digits (X) within time specifiers. It also wasn’t practical to ignore the time when parsing the EDTF date, because the EDTF date can contain a whole range or set of dates with time precision, not just one. Fortunately, at least EDTF.js seems to recognize 24:00:00 as a synonym for midnight that does not roll over into the following day, per ISO 8601-1:2019/Amd 1:2022.

Fixes OpenHistoricalMap/issues#764.

@1ec5
Copy link
Member Author

1ec5 commented Aug 3, 2024

@erictheise let me know if there’s anything I can do to make this easier to review. Thanks!

@erictheise erictheise merged commit 5cfff58 into staging Aug 6, 2024
6 checks passed
@erictheise erictheise deleted the 1ec5-edtf-time-mismatch-764 branch August 6, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsatisfiable warning about mismatched date when EDTF date specifies a time
2 participants