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

As a content editor, I want Anno Mundi dates automatically converted to standard dates when possible, so that dates can be compared and used for filtering and sorting. #854

Closed
9 tasks done
rlskoeser opened this issue May 11, 2022 · 1 comment
Assignees

Comments

@rlskoeser
Copy link
Contributor

rlskoeser commented May 11, 2022

testing notes

Test editing a document in the admin and set an original date and Anno Mundi calendar, with no value in the standard date. Use the "save and continue editing" button to save the record. The standard date should be populated for you based on the original date you entered. You should also see a read-only human readable version of the date next to the standard date field.

Test a variety of examples:

  • year only
  • month and year
  • month, year, and day
  • "first decade of ..." or similar — currently unsupported; you should see a notice
  • if you put content in the standardized date directly yourself, it should stay there (i.e., conversion logic shouldn't override manual entry, even if they differ)

dev notes

this implementation should handle only the basic cases, as already prototyped in #714

  • refactor Document date logic into a mixin to make the code more manageable
  • add method to calculate standard date on Document save if calendar is Anno Mundi
  • display human-readable version of the standard date for easier checking/comparison between dates
  • warn if date can't be parsed / calculated
@richmanrachel
Copy link

@rlskoeser - it works! We're so excited

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

No branches or pull requests

2 participants