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 field should store the date in a standardized format #216

Open
apexdodge opened this issue Sep 30, 2024 · 0 comments
Open

date field should store the date in a standardized format #216

apexdodge opened this issue Sep 30, 2024 · 0 comments

Comments

@apexdodge
Copy link
Contributor

Our date field for the content item stores the date in the format selected in the admin settings.

This is normally fine, but I realize there is an edge case: What happens if the admins change their mind after populating the website with content, and now want the date format to be different. So they go into admin settings and change the date format. This will result in some date fields being stored as the old option so this causes a problem.

Solution:

We should store all date field as yyyy-MM-dd and perform all calculations as such in queries, but we convert to the desired format in admin settings in-memory.

This would require a database migration script, so we'll save this for a 1.x release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant