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

Default date style to "dmy" (or something less ambiguous) #5

Open
allenap opened this issue Apr 13, 2022 · 1 comment
Open

Default date style to "dmy" (or something less ambiguous) #5

allenap opened this issue Apr 13, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@allenap
Copy link
Owner

allenap commented Apr 13, 2022

The default "mdy" (month, day, year) configuration is appropriate for the US, but that's about it. It's confusing for everyone else. It would be nice to find a default that is not ambiguous/confusing for everyone. Failing that, "dmy" might be a more appropriate default than "mdy". This may equally be a non-issue if clients like psql do something locale-specific already.

@allenap allenap added the enhancement New feature or request label Apr 13, 2022
@allenap
Copy link
Owner Author

allenap commented Apr 14, 2022

There is a "ymd" option – see the docs – which might be the least ambiguous of all except that the year is only two digits 🤦

At this point I'm pretty sure it's better to avoid anything that must be disambiguated with the DateStyle setting. There are ways of inputting dates that are unambiguous which folks should absolutely use, and thus avoid DateStyle-related shenanigans – see those docs – and the principle of least surprise suggests sticking with the default date style of "mdy" otherwise, despite being perhaps the least suitable choice for most people.

Display of dates is unaffected: that's governed by the first part of the DateStyle setting, and that defaults to ISO, which is thankfully well recognised and I assume unambiguous in any region.

I'm going to leave this issue open for a bit in case I think of something new, or someone else comments, but it's likely that this is going to get closed without any change being made. Perhaps it's useful to put this in the documentation though.

@allenap allenap added the documentation Improvements or additions to documentation label Apr 14, 2022
@allenap allenap transferred this issue from allenap/rust-postgresfixture Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant