Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

YMD has caught on, I think, because it allows for the numbers to be "in order" (not mixed-endian) while still having the month before the day which matches the practice for speaking dates in (at least) the US and Canada.


The primary reason for YMD is that DDMMYYYY is ambiguous with MMDDYYYY


It is also sortable, which I think is the real advantage.


I used to think this was really important, but what's the use case here?

If I'm writing a document for human consumption then why would I expect the dates to be sortable by a naive string sorting algorithm?

On the other hand, if it's data for computer consumption then just skip the complicated serialisation completely and dump the Unix timestamp as a decimal. Any modern data format would include the ability to label that as a timestamp data type. If you really want to be able to "read" the data file then just include another column with a human-formatted timestamp, but I can't imagine why in 2025 I would be manually reading through a data file like some ancient mathematician using a printed table of logarithms.


> If I'm writing a document for human consumption then why would I expect the dates to be sortable by a naive string sorting algorithm?

If you're naming a document for human consumption, having the files sorted by date easily without relying on modification date (which is changed by fixing a typo/etc...) is pretty neat


This is exactly it - file name is easy to control and sort on; creates date and modified date are (for most users) random and uncontrolled.


So you can't sort by name, author etc? One sort key? What year is it?!


As ling as you pad to two characters!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: