Remix.run Logo
armchairhacker 6 days ago

dd/mm/yyyy is most common worldwide (particularly Europe, India, Australia) followed by yyyy/mm/dd (particularly China, Japan, South Korea).

https://wikipedia.org/wiki/Date_and_time_representation_by_c...

IMO the best format is yyyy/mm/dd because it’s unambiguous (EDIT: almost) everywhere.

Izkata 6 days ago | parent | next [-]

For a really cursed one that breaks your last comment, check out Kazakhstan on the list by country: https://en.wikipedia.org/wiki/List_of_date_formats_by_countr...

> Short format: (yyyy.dd.mm) in Kazakh[95][obsolete source]

o11c 6 days ago | parent [-]

Even ISO has used the cursed date format.

ISO-IR-26 was registered on 1976/25/03.

fastball 6 days ago | parent | prev | next [-]

Not only is YYYY/MM/DD unambiguous, but it also sorts correctly by date when you perform a naive alphabetical sort.

LoganDark 6 days ago | parent [-]

I believe YYYY-MM-DD is even less ambiguous than YYYY/MM/DD.

a96 6 days ago | parent [-]

Correct. Slashes mean it's a yank date and going to be backwards. Dashes hint that it's going to be (close to) ISO standard.

_Algernon_ 6 days ago | parent | next [-]

And it doesn't use a path-separator character for the date.

tom_ 6 days ago | parent | prev [-]

Slashes are used for dd/mm/yyyy as well. Dashes are indeed better if you want a separator. or use the separator-free ISO 8601 syntax.

worik 4 days ago | parent [-]

I just use the number of peta-seconds since I was born....

accrual 6 days ago | parent | prev [-]

I like CCYY-MM-DD because it's also a valid file name on most systems, and using "CCYY" (century + year) instead of "YYYY" feels fancy.

Fwirt 6 days ago | parent [-]

Except this could get confusing because the year 1976 (for example) is actually in the 20th century.

accrual 6 days ago | parent [-]

That is a good point. The "ordinal" century doesn't exactly line up with the digits in a "YYYY" format, thus "CCYY" creates some ambiguity depending on how one defines "century".

I conclude my fanciness of using "CCYY" is not useful. :)