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

Revert accepting 3-digit years #107

Merged
merged 1 commit into from
Aug 23, 2023
Merged

Conversation

seth-shaw-asu
Copy link
Member

GitHub Issue: N/A

To quote myself:

I am mistaken, [EDTF] does require four years.

I went back to review the spec and was reminded that EDTF is an extension of ISO 8601, which means that the base rules of that spec still apply. Although EDTF only specifies a required number of year digits for significant digits notation, the base rules for ISO 8601 do require four digits.

So, mea culpa, those three-digit years are invalid.

What does this Pull Request do?

Puts back check for four+ digit years.

What's new?

  • Does this change require documentation to be updated? No
  • Does this change add any new dependencies? No
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? No
  • Could this change impact execution of existing code? Not unless you added some three-digit years since the error was introduced.

How should this be tested?

Tests pass. 👍

Interested parties

@Islandora/committers

@rosiel
Copy link
Member

rosiel commented Aug 17, 2023

It seems very odd to me that a library standard that accepts year 17000000 does not accept years -999 through 999. But I think they do, just with leading zeroes, per ISO 8601?

Interesting (to me) was the Wikipedia page on ISO 8601:

ISO 8601 prescribes, as a minimum, a four-digit year [YYYY] to avoid the year 2000 problem. It therefore represents years from 0000 to 9999, year 0000 being equal to 1 BC and all others AD, similar to astronomical year numbering. However, years before 1583 (the first full year following the introduction of the Gregorian calendar) are not automatically allowed by the standard. Instead, the standard states that "values in the range [0000] through [1582] shall only be used by mutual agreement of the partners in information interchange".[19]

This seems very relevant to cultural heritage institutions.

@seth-shaw-asu
Copy link
Member Author

...I think they do, just with leading zeroes, per ISO 8601?

Precisely.

@rosiel rosiel merged commit 6a3c63a into Islandora:2.x Aug 23, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants