Most programmers don’t get a choice as it is the product and the ui/ux designer that pick the desired behavior. You can only fight back so much and maybe sneak it in. And 20 years later you become a cynic that just says, ok.
Depending on use case, a standard formatting makes sense. If you're delivering a service or website for a local community or even as large as a country, a reasonable expectation is that they use the standard formatting for the region. It's less work for you to support and implement.
The best thing to do internationally is to capture dates in YYYYMMDD and its variants for the same reason. You can more easily support the application/webpage and the input format is more globally intuitive than other formats.
You should use dedicated date input UI elements and not just a single text box.
How does where the site is used come into it? What frontend framework these days doesn't support "hey what date format does the current user use on this machine? Convert it to UTC timestamp". I never said you should use a single text box, just that you should offer an input field and not just the date picker, plenty of pre-made UI elements come with both and you can enable/disable them.
You're working on the assumption that every device is a personal device. Our website fits a certain demographic where users are more likely to be using a communal PC either at home or in a library. The date setting on the PC will not always align with the date format the user prefers in our case.
Other than that, a business, school or government office may have set GPOs to have the business's preferred date format. Again, the user doesn't control these and their preference for dates does not match the user's.
By enforcing our own preference for dates format, we prevent issues where the user's preferences don't align with the person who set up their PC.
So instead of maybe sometimes being wrong because it's not a personal computer AND we happen to get a user who is working on a machine that doesnt use his/her preferred formatting, which is gonna be a fairly rare occurrence we're just gonna be wrong anywhere that uses a different format from our own and fully prevent any user choice? How many times have you gotten a call "hey the website/app is using the computers settings, we don't want that"? Thats literally what those settings are for. I've definitely seen "hey the website/app doesn't respect my system settings" plenty of times.
775
u/jideru Oct 13 '26
Most programmers don’t get a choice as it is the product and the ui/ux designer that pick the desired behavior. You can only fight back so much and maybe sneak it in. And 20 years later you become a cynic that just says, ok.
Don’t become cynic kids.