[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: date +%W bug
From: |
Jim Meyering |
Subject: |
Re: date +%W bug |
Date: |
Wed, 09 Jan 2002 14:02:11 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu) |
Dominique Bouix <address@hidden> wrote:
> After Sunday 30th Dec 2001 date +%W has been printing out the incorrect
> results.
>
> On Monday 31th Dec 2001 the output of date +%W was '53'.
> On Tuesday 1st Jan 2002 the output of date +%W was '00'.
> Today, Wednesday 9th Jan 2002 the output of date +%W is '01'.
Those are correct.
> According to my (Finnish) calendar it is currently week 2 and the whole of
> last week was week number one.
That's true (not counting Sun/Mon of last week which were in 2001)
if you start counting with `1', but with %W, date starts with 0.
Here's what the manual (`info date') says:
`%W'
week number of year with Monday as first day of week (00...53).
Days in a new year preceding the first Monday are in week zero.
- date +%W bug, Dominique Bouix, 2002/01/09
- Re: date +%W bug,
Jim Meyering <=