|
From: | Paul Eggert |
Subject: | Re: date -d20060229 gives: "invalid date" |
Date: | Mon, 28 Aug 2006 22:08:17 -0700 |
User-agent: | Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Steve Cousins <address@hidden> writes: > date Versions 5.96 and 5.97 (at least) have a bug when passing dates > that are greater than the actual number of days in a month. Previous > versions (most of the machines seem to have 5.2.1) would convert the > date to a correct date. The change was advertised as a "new feature" in NEWS: Dates like `January 32' with out-of-range components are now rejected. > date -d"20060201 - 1 day" > > does not work. It reports Feb 2. Try this: date -u -d"2006-02-01 -1 day" The "-u" is to avoid problems with DST transitions.
[Prev in Thread] | Current Thread | [Next in Thread] |