Hacker News new | past | comments | ask | show | jobs | submit login

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.




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

Search: