Justin Pryzby wrote: > coreutils: date return 2005-03-01 for --date "last month" > http://bugs.debian.org/301972 > > The quoted manual says that -1 month might actually lie in the current > month. It doesn't say that date can't subtract one from the current > month to give the first day of the previous month (are there even any > cases where the 1st doesn't exist?).
The problem the original poster reported was this: date Tue Mar 29 14:38:04 CEST 2005 date --date "1 month ago" Tue Mar 1 14:35:31 CET 2005 Since there is no Febrary 29th 2005 it is an invalid date. Newer versions of date from coreutils print this following diagnostic. date -d "Tue Mar 29 05:38:04 MST 2005 -1 month" date: invalid date `Tue Mar 29 05:38:04 MST 2005 -1 month' The operation requested generates an invalid date and this is now reported corrected correctly in later version of the coreutils. > This still seems like a real bug; Bob, do you really consider it > "wontfix"? When a newer upstream coreutils is released into Debian this bug will be fixed. It is already fixed upstream. The particular case under discusion here is an invalid date and newer versions of GNU coreutils date produce a diagnostic indicating this. The Etch coreutils does not print a diagnostic in that case. Bob -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

