bug-coreutils
[Top][All Lists]
Advanced

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

bug#8930: date +%C


From: Eric Blake
Subject: bug#8930: date +%C
Date: Fri, 24 Jun 2011 13:52:02 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

tag 8930 notabug
thanks

> ~$ *date*
> vendredi 24 juin 2011, 20:32:50 (UTC+0200)
> ~$ *date +%C*
> 20
> 
> 
> *# 21st Century !*
> 

Thanks for the report.  However, this is not a bug.

%C does not mean the century in common parlance, rather, according to
POSIX, it means:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html

> 
> %C
>     Century (a year divided by 100 and truncated to an integer) as a decimal 
> number [00,99].

Yes, the mnemonic is using century for lack of a better term, but it is
correctly printing all but the last two digits of the year.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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