"matt smiglarski" <[EMAIL PROTECTED]> writes: > The following shows how the year is not rolled back. > > # date > Wed Jan 2 12:12:23 GMT 2008 > # date --date '2 days ago' +'%G-%m-%d %k:%M:%S' > 2008-12-31 12:12:53
RTFM. `%G' year corresponding to the ISO week number. This has the same format and value as `%Y', except that if the ISO week number (see `%V') belongs to the previous or next year, that year is used instead. It is normally useful only if `%V' is also used; for example, the format `%G-%m-%d' is probably a mistake, since it combines the ISO week number year with the conventional month and day. This is a GNU extension. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils