4 ms·
Here is how strftime on OSX defines it: %G is replaced by a year as a decimal number with century. This year is the one that contains the g
by bcl 17y ago
Here is how strftime on OSX defines it:
%G is replaced by a year as a decimal number with century. This
year is the one that contains the greater part of the week
(Monday as the first day of the week).
%g is replaced by the same year as in ``%G'', but as a decimal
number without century (00-99).
Makes sense to me. People should read the man pages more often before they jump to conclusions.
Granted, that is more clear than man date on Linux (on OSX it doesn't define the format variables):
%g last two digits of year of ISO week number (see %G)
%G year of ISO week number (see %V); normally useful only with %V
%V ISO week number, with Monday as first day of week (01..53)