3 ms·
07/04/2008 -> April 7th seems about as reasonable a result as July 4th, especially when you've explicitly opted in to a Turkish locale. I don't agree with the a
by Macha 6y ago
07/04/2008 -> April 7th seems about as reasonable a result as July 4th, especially when you've explicitly opted in to a Turkish locale. I don't agree with the article's assertion that the format being interpreted according to the user's locale is wrong here, the one wrong part is a US centric programmer's expectation that PP-QQ-YYYY is an unambiguous format. Use YYYY-mm-dd when you need a format that's not ambiguous
- heavenlyblue 6y ago> PP-QQ-YYYY is an unambiguous format “US centric” is one way to say it
- snthd 6y ago> 07/04/2008 -> March 7th I think you mean April.
- Macha 6y agoFixed
- frabert 6y agoYYYY-mm-dd also plays nice with lexicographic ordering, which is why I always use it when I need to put dates in e.g. filenames
- Macha 6y agoI'm a European working primarily with Americans. My home country uses dd/mm/YYYY (or dd/mm for short) and the US uses mm/dd/YYYY for with mm/dd for short. I've switched to YYYY-mm-dd simply for my own sanity and if I omit the year I write the month in text format, such as "5 June".
- withinboredom 6y agoThe US military uses the almost same convention (dd-mmm-yyyy) so 07-aug-2020.
- dgellow 6y agoThat’s dd-mmm-yyyy
- withinboredom 6y agoThanks!
- Macha 6y agoNote: This is actually a reply to the article here: https://news.ycombinator.com/item?id=24178270 https://news.ycombinator.com/item?id=24178270 , for some reason I thought that was the top level link. Maybe if dang sees this, it could be reparented?
- knolax 6y agoI don't get why people don't just use something like 8m16d2020y. There, it's the same number of characters and clearly unambiguous even to someone who hasn't seen the format before.
- cesarb 6y agoJapan does something like that; according to Wikipedia (https://en.wikipedia.org/wiki/Date_format_by_country https://en.wikipedia.org/wiki/Date_format_by_country), its date format is 2020年08月16日