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

Date formatting #484

Open
grahamjevon opened this issue Oct 5, 2023 · 1 comment
Open

Date formatting #484

grahamjevon opened this issue Oct 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@grahamjevon
Copy link
Collaborator

grahamjevon commented Oct 5, 2023

Hi @cziaarm , we have noticed something that might be linked to the date formatting change you made (EDIT: If #464 fix is not in production yet, then I guess this is unrelated to the date formatting change you made).

If BX "date_published" field contains a date in the format "2023-12-17", everything works as expected. But if a date is entered in BX using the format "17/12/2023", some behaviour changes.

In both cases, the data is stored as expected in the "edit" page, but there are two differences:

  1. In the recent additions feed, the "17/12/2023" date has the whole date showing under the thumbnail rather than just the year.

Image

  1. In the metadata record page, the date is displayed based on the format it appeared in the csv.

Image

Image

@grahamjevon grahamjevon added the bug Something isn't working label Oct 5, 2023
@cziaarm
Copy link
Collaborator

cziaarm commented Oct 6, 2023

Hi @grahamjevon

The view for these search results specifies the document.year_published following this to it's definition I can see that it expects YYYY-MM-DD format dates. Should be easy to amend this to handle DD/MM/YYYY too (i.e. grab just the year from those).

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
Status: Ready for Development (Bugs)
Development

No branches or pull requests

2 participants