Today, being "Sat Mar 30 13:45:38 PST 2002",
and date, being "date (GNU sh-utils) 2.0",
on "Linux spew 2.4.18 #2 Fri Mar 15 14:15:51 PST 2002 i686 unknown",
the following happens:

  % date --date 'last month'
  Sat Mar  2 13:47:14 PST 2002

when I would expect:

  % date --date 'last month'
  Thu Feb  28 13:47:14 PST 2002

This might be a design bug or an implementation bug as interpretation
of "last month" is ambiguous.
But either way, leaving it the way it is has very unintended consequences
in unambiguous circumstances:

  % date --date 'last month' +%Y-%m
  2002-03

Obviously, 2002-03 is "this month" :)

Don't know if this is related to the special month of February or
whether this probelm would happen on May 31st as well.

Thank you

_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to