"Robert Derryberry" <[EMAIL PROTECTED]> 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, [EMAIL PROTECTED]
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."
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils