bug-coreutils
[Top][All Lists]
Advanced

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

Re: date returns wrong year in the first calendar week if used with "1 w


From: Andreas Schwab
Subject: Re: date returns wrong year in the first calendar week if used with "1 weeks ago"
Date: Sun, 09 Jan 2005 17:18:16 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

"Robert Marz" <address@hidden> writes:

> i found a bug in the date command.
> date returns wrong year in the first calendar week if used with "1 weeks
> ago"

This has nothing to do with "1 weeks ago" or any other relative date spec.

> address@hidden date-bug]$ date +%Y-KW%V -d " 1 weeks ago"
> # OUCH, wrong year!
> 2005-KW53

This is completely correct.  Read the documentation of the %V spec and use
%G instead of %Y.

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]