5
0
Is there a historical reason why date
's %h
and %b
format codes produce the same output?
$ echo $(date +\%h)
Mar
$ echo $(date +\%b)
Mar
Other redundancies exist in date
format codes as well, but this one caught my attention this morning. See also this page.
Indeed.
%h
seems the odder of those two choices. – wallyk – 2016-03-08T19:52:36.860My guess is that there were originally two different implementations that used a different format code. For compatibility, both have been retained. – Barmar – 2016-03-08T20:42:53.050