Skip to content

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

Comments

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.

AboutSource Built by g1lg1l

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