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

updated unspecified date output #134

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

joshdentremont
Copy link

GitHub Issue: #133

What does this Pull Request do?

Changes the way the EDTF formatter outputs dates with Xs in them. Previously there were several dates that would not display correctly, as noted in the issue above.

What's new?

With this PR, they will now be labelled as unknown dates instead of unspecified dates

Also changed wording of years to better represent that they refer to a year in the decade, century, millennium, rather than the whole decade, century or millennium.

For middle endian dates, separated by spaces, and with the month spelled out (eg. January 1, 1999), this also adds a lot of extra formatting to write those unknown dates out in a more verbose manner that should make sense to site users who don't have archival backgrounds. Also, should not be ambiguous with regard to the difference between 190X and 19XX as it will state if it is a century or a decade.

The output with this PR should now look like this:

Input middle endian, spaces, month in letters (before this PR) middle endian, spaces, month in letters (after this PR)
1999 1999 1999
1999-01 January 1999 January, 1999
1999-01-01 January 1, 1999 January 1, 1999
199X unspecified year in 199X Unknown year in the decade of the 1990s
19XX unspecified decade in 19XX Unknown year in the century of the 1900s
1XXX unspecified century in 1XXX Unknown year in the millennium of the 1000s
XXXX unspecified year in XXXX Unknown year
1999-XX unspecified month in 1999 Unknown month, in 1999
199X-XX unspecified year and month in 199X Unknown month, in the decade of the 1990s
199X-01 unspecified year in January 199X January, of an unknown year in the decade of the 1990s
19XX-01 unspecified decade in January 19XX January, of an unknown year in the century of the 1900s
1XXX-01 unspecified century in January 1XXX January, of an unknown year in the millennium of the 1000s
1999-01-XX unspecified day in January 1999 Unknown day in January, 1999
1999-XX-XX unspecified month and day in 1999 Unknown date, in 1999
199X-XX-XX unspecified year, month, and day in 199X Unknown date, in the decade of the 1990s
XXXX-XX-XX unspecified year, month, and day in XXXX Unknown day, month, and year
19XX-XX-XX unspecified decade, month, and day in 19XX Unknown date, in the century of the 1900s
1XXX-XX-XX unspecified century, month, and day in 1XXX Unknown date, in the millennium of the 1000s
1999-XX-01 unspecified month in 1, 1999 1st day of an unknown month, in 1999
199X-XX-01 unspecified year and month in 1, 199X 1st day of an unknown month, in the decade of the 1990s
19XX-01-XX unspecified decade and day in January 19XX Unknown day in January, in the century of the 1900s
190X-01-XX unspecified year and day in January 190X Unknown day in January, in the decade of the 1900s
XXXX-XX-01 unspecified year and month in 1, XXXX 1st day of an unknown month, in an unknown year
XXXX-12-XX unspecified year and day in December XXXX Unknown day in December, in an unknown year
192X-01-01 unspecified year in January 1, 192X January 1, of an unknown year in the decade of the 1920s
Input little endian, slashes, 2 digit month & day (before this PR) little endian, slashes, 2 digit month & day (after this PR)
1999 1999 1999
1999-01 01/1999 01/1999
1999-01-01 01/01/1999 01/01/1999
199X unspecified year in 199X Unknown year in the decade of the 1990s
19XX unspecified decade in 19XX Unknown year in the century of the 1900s
1XXX unspecified century in 1XXX Unknown year in the millennium of the 1000s
XXXX unspecified year in XXXX Unknown year
1999-XX unspecified month in 1999 Unknown month/1999
199X-XX unspecified year and month in 199X Unknown month/unknown year in the decade of the 1990s
199X-01 unspecified year in 01/199X 01/unknown year in the decade of the 1990s
19XX-01 unspecified decade in 01/19XX 01/unknown year in the century of the 1900s
1XXX-01 unspecified century in 01/1XXX 01/unknown year in the millennium of the 1000s
1999-01-XX unspecified day in 01/1999 Unknown day/01/1999
1999-XX-XX unspecified month and day in 1999 Unknown day/unknown month/1999
199X-XX-XX unspecified year, month, and day in 199X Unknown day/unknown month/unknown year in the decade of the 1990s
XXXX-XX-XX unspecified year, month, and day in XXXX Unknown day/unknown month/unknown year
19XX-XX-XX unspecified decade, month, and day in 19XX Unknown day/unknown month/unknown year in the century of the 1900s
1XXX-XX-XX unspecified century, month, and day in 1XXX Unknown day/unknown month/unknown year in the millennium of the 1000s
1999-XX-01 unspecified month in 01/1999 01/unknown month/1999
199X-XX-01 unspecified year and month in 01/199X 01/unknown month/unknown year in the decade of the 1990s
19XX-01-XX unspecified decade and day in 01/19XX Unknown day/01/unknown year in the century of the 1900s
190X-01-XX unspecified year and day in 01/190X Unknown day/01/unknown year in the decade of the 1900s
XXXX-XX-01 unspecified year and month in 01/XXXX 01/unknown month/unknown year
XXXX-12-XX unspecified year and day in 12/XXXX Unknown day/12/unknown year
192X-01-01 unspecified year in 01/01/192X 01/01/unknown year in the decade of the 1920s

How should this be tested?

Add some dates with Xs in them. Test the EDTF formatter with and without this PR to see the difference.

Additional Notes:

N/A

Interested parties

@Islandora/committers

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.

1 participant