bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error with `/bin/date`


From: Andreas Schwab
Subject: Re: Error with `/bin/date`
Date: Tue, 01 Feb 2005 11:45:11 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

"Robert Derryberry" <address@hidden> writes:

> Note the date is January 31st, not February 1st.  The resulting date
> math is incorrect.
>
> [LNXPROD1:/home/cfmc/telsam] cfmc% date
> Mon Jan 31 09:56:23 CST 2005
>
> [LNXPROD1:/home/cfmc/telsam] cfmc% date --date='next month' +%m
> 03
> [LNXPROD1:/home/cfmc/telsam] cfmc% date --date='next month' +%b
> Mar
> [LNXPROD1:/home/cfmc/telsam] cfmc% date --date='next month' +%B
> March

*Note (coreutils)Relative items in date strings::.

       The fuzz in units can cause problems with relative items.  For
    example, `2003-07-31 -1 month' might evaluate to 2003-07-01, because
    2003-06-31 is an invalid date.  To determine the previous month more
    reliably, you can ask for the month before the 15th of the current
    month.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]