Skip to content

Comment on Go Date Formatparent

Comments

I still can't remember %m vs %M without thinking twice about it

The time component is "%H:%M:%S" — it's all capitals, and I always think "her majesty's ship" when I type it for some odd reason. At any rate, that's how I remember it.

Once I work out that time component, then the date falls into place: "%m-%d-%Y".

But yes, strftime's formatting strings aren't memorable.

(I'm also a server-side engineer, so I active try to avoid formatting dates into anything other than ISO-8601…)

AboutSource Built by g1lg1l

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