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

[BUG] EDTF formatter not handling unspecified years/months properly #133

Closed
bondjimbond opened this issue Sep 18, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@bondjimbond
Copy link

What steps does it take to reproduce the issue?

In the Date Issued field, enter some EDTF-valid dates with "unspecified" values. Rendered results are misleading and not clear. Use the sample dates below.

Sample dates:

  • XXXX-XX-31: renders as "unspecified year and month in XXXX-31"
    • Month is lost altogether
    • Language is extremely unclear and confusing; should be "Day 31 in unspecified year and month" or similar
  • XXXX-12-XX: renders as "unspecified year and day in XXXX-12"
    • Again, language extremely unclear
    • Should be something like "Unspecified year and day in December" or "in month 12" depending on config
  • 156X-12-25: renders as "unspecified year in 156X-12-25"
    • Awkward construction, doesn't quite make sense
  • 2004-%06-11: renders as "2004-06-11 (month uncertain; month approximate)"
    • Only one of these uncertain or approximate tags is needed
  • 202X: Renders as "unspecified year in 202X"
    • Ideally would render as "unspecified year in 2020s"
  • 20XX: Renders as "unspecified decade in 20XX"
    • Ideally would render as "unspecified decade in 2000s"
  • When does this issue occur?

Most types of date where uncertainty is indicated.

  • Which page does it occur on?

Repository Item nodes.

  • To whom does it occur (anonymous visitor, editor, administrator)?

All users.

  • What did you expect to happen?

See rendering descriptions under Steps.

Which version of Islandora are you using?

HEAD

Any related open or closed issues to this bug report?

None

Screenshots:

Screenshot 2024-09-18 at 10 06 44 AM
Screenshot 2024-09-18 at 10 07 09 AM

@bondjimbond bondjimbond added the bug Something isn't working label Sep 18, 2024
@DonRichards
Copy link
Member

Example on our site the confirms this is an issue. https://digital.library.jhu.edu/islandora/photograph-painting-charles-morton-stewart
Output is unspecified year in 189X (year uncertain; year approximate)

@joshdentremont
Copy link
Contributor

Just put in a PR for this (#134), that I think addresses all the above concerns, except for the % one, which I think is actually correct. If you don't want uncertain AND approximate, you should use ? or ~ instead.

From the EDTF specs:

The characters '?', '~' and '%' are used to mean "uncertain", "approximate", and "uncertain" as well as "approximate", respectively.

@seth-shaw-asu
Copy link
Member

@bondjimbond, we just merged @joshdentremont's PR #134. Any other changes you would recommend before we close this issue?

@bondjimbond
Copy link
Author

That's beautiful, thanks @joshdentremont.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants