Re:It's Time for a Change: Datetime.utcnow() Is Now Deprecated
by vsnf on Sunday November 19, 2023 @09:58PM
(#38341701)
> What’s especially maddening in it is that it is so US-centric, with month coming before day in these number patterns,
Whether this particular bit of design is good or not, you'll certainly be hard pressed to find someone who has a reasonable argument in favor of the absurdity that is the Go date-time format string.
> 2006-01-02 (aka 'yyyy-MM-dd')
> January 02, 2006 (aka 'MMMM dd, yyyy')
> Jan-06 (aka 'MMM-yy')
> Monday (aka 'EEEE')
It's insanity start to finish and it boggles the mind how it was ever accepted in the language spec.
My personally most hated piece of date-related API is Go’s formatting API, with its asinine number-based patterns instead of something reasonable and conventional like strftime-like or Java-like symbols. What’s especially maddening in it is that it is so US-centric, with month coming before day in these number patterns, which does not follow unit size increase or decrease sequence.