Skip to content

Comment on Fix date-handling bug when today’s date is later than the target monthparent

Comments

This is why I normally use "23/Aug/2023" form. Only breaks down if you don't know the months in English.

My military friend uses YYYY/MM/DD. Used to tick me off, but makes sense now.

ISO8601 or death

ISO 8601 is yyyy-mm-ddthh:mm:ss.sssZ

I use this format generally because a basic string sort puts them in the correct order.

trying to sort MM/DD/YYYY is just silly.

Days in that format even order as proper numbers instead of some kind of little endian disaster.

I've seen people do YYYY/DD/MM, so your friend's format isn't foolproof. OTOH although I'm sure some insane person somewhere has done YYYY-DD-MM I've never seen it so YYYY-MM-DD should be safe.

YYYY/MM/DD is in order of size. Y > M > D makes some kind of sense.

Some languages pronounce the date as year, day, month so some people write YYYY/DD/MM. Since both YYYY/DD/MM and YYYY/MM/DD make sense to different people, neither should be used.

ISO 8601, ftw.

I also really like this form for regular communications, though I use spaces. It feels more natural than ISO format while being unambiguous. You can also add the day of the month and it's nicely balanced between letters and numbers, and you can also drop the year when it's clear from context:

"Hey, are you free for dinner on Wed 23 Aug?"

ISO is great for records and filename, but it's clumsy in conversation:

"Hey, are you free for dinner on 2023-08-20?"

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.