I love Go's date format syntax: > The reference time used in these layouts is the specific time stamp: 01/02 03:04:05PM '06 -0700 (January 2, 15:04:05, 2006, in time zone seven hours west of GMT). That value is recorded as the constant named Layout, listed below. As a Unix time, this is 1136239445. > RFC3339 = "2006-01-02T15:04:05Z07:00" https://golang.org/pkg/time/
Do not use 'week year': YYYY
91–94 of 94 posts
Re: Do not use 'week year': YYYY
#92I love Go's date format syntax: > The reference time used in these layouts is the specific time stamp: 01/02 03:04:05PM '06 -0700 (January 2, 15:04:05, 2006, in time zone seven hours west of GMT). That value is recorded as the constant named Layout, listed below. As a Unix time, this is 1136239445. > RFC3339 = "2006-01-02T15:04:05Z07:00" https://golang.org/pkg/time/
It only works well if you’re familiar with the US form of dates…
Re: Do not use 'week year': YYYY
#93Re: Do not use 'week year': YYYY
#94Earlier quoted context omitted.
This is easier to read but not descriptive enough since there are different kinds year, month, day. Year can be 2 digits, 4 digits, regular or week year. Month can have leading zero or not, long name, short, name. Day could be Julian, leading zero or not, day of the week, etc
That's when you can be more precise if you want: `[year padding:zero repr:full base:calendar sign:automatic]`. The format is also checked on compile time.