Go's time formatting strings are uniquely idiosyncratic, and I have not seen any other language use this sort of system:
- It is based on the exact timestamp for
01/02 03:04:05PM '06 -0700
, which is "January 2, 15:04:05, 2006, in time zone seven hours west of GMT" (source). - Time formatting strings are the above timestamp formatted into the desired format, e.g. the default datetime format used by the Unix
date
command can be represented asMon Jan _2 15:04:05 MST 2006
. - The documentation for the
time
package notes that it is a "regrettable historic error" that months come before the days, as in American date formatting.
Where did this sort of datetime formatting come from, i.e. was this taken from another language? And why was this method in particular chosen for Go?