bug-coreutils
[Top][All Lists]
Advanced

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

Re: date +%u%w bug?


From: Eric Blake
Subject: Re: date +%u%w bug?
Date: Thu, 01 Jun 2006 06:36:18 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Rick Richardson on 5/31/2006 9:55 PM:
> $ date +%u%w
> 33
> 
> Shouldn't this be 43???

No.  According to date --help, %u maps 1-7 starting at Monday, and %w maps
0-6 starting at Sunday.  So one time in seven %u%w will be 70, all other
days the two are equal.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEft9B84KuGfSFAYARAkF5AJ0Sj3LRgjffYeeKN6XElJmpOiy+5QCgy7Wt
QfYtOCa8Nl4G2B3kEKKFXoI=
=8Y0B
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]