3 ms·
The date format part is ridiculous. Americans are almost unique in using mm/dd/yyyy, so an assumption of that would be plain wrong.
by beardyw 2y ago
The date format part is ridiculous. Americans are almost unique in using mm/dd/yyyy, so an assumption of that would be plain wrong.
- bayindirh 2y agoLocalization libraries handle these parts well, since date is same with Europe (and generally stored as time-date objects rather than pure strings). None of the number shenanigans cause problems since these numbers are always stored as IEEE754 or other decimal formats. Money is no problem as well. However, when you go through an upper() or lower() or anything which plays with capitalization, and if that data is being fed to a hash algorithm or anything which mucks with strings, boy, oh boy... The easiest way is to sanitize these programmatic parts with forced locale of en_US or plain old "C". If the strings is not facing to the user and never localized, just force its locale. It's the only sane way.
- oblio 2y ago> since date is same with Europe Do you mean MM-DD-YYYY? No, the vast majority of Europe does DD-MM-YYYY in some form or another.
- bayindirh 2y agoNo, I mean DD-MM-YYYY. We use the same format with the vast majority of Europe.
- oblio 2y agoI'm confused, are you talking about the US? The US for sure does not default to DD-MM-YYYY.
- bayindirh 2y agoI'm talking about the Turkish Language, its locale and its peculiarities since it has letters "ı" and "İ". So, I'm talking about Turkish date format. Turkey uses DD-MM-YYYY format, like the most of the Europe.
- a3w 2y agohttps://xkcd.com/1179/ https://xkcd.com/1179/ I heard the US and A are moving to the hissing cat date format shown here.
- Muromec 2y agoI kind of like the one using roman numerals for month. Reasonable people would figure out that other reasonable people would not use roman numerals for days, so the order can be implicit. I like implicit ordering, it always makes things more interesting.
- bluGill 2y agoI have switched to yyyymmdd for everything - it is usually obvious to everyone what date I mean.
- bayindirh 2y agoI also use the same format while naming my files, or in changelogs or whatnot, but not all documents are suitable for that, and in the presentation layer you need to match the country standards. However, date is mostly presentation and internal storage of these are vastly different than what we see generally.
- bluGill 2y agoI don't match country standards. That is the point.
- kelnos 2y agoIt depends on what you're doing, though. If you're helping people fill out documents (even non-government documents), then you really need to match the country standard. Localization is important; some countries outright require it if you're going to do business within their borders. But even where it's not required, you will lose customers if your website/application/product feels "foreign". I'm not sure date ordering is a big enough deal to trigger that feeling in anyone, but unless it's a huge burden to format things the way people expect, I would do so for the UX benefits.