Subject: bug#8930: closed (Re: date +%C)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 24 Jun 2011 19:53:02 +0000

Your bug report

#8930: date +%C

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
8930: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8930
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: date +%C
From: Eric Blake <[email-masked]>
To: Dimitri Tassiaux <[email-masked]>, [email-masked]
Date: Fri, 24 Jun 2011 13:52:02 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

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   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Subject: date +%C
From: Dimitri Tassiaux <[email-masked]>
To: [email-masked]
Date: Fri, 24 Jun 2011 20:39:41 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

~$ *date*
vendredi 24 juin 2011, 20:32:50 (UTC+0200)
~$ *date +%C*
20

*# 21st Century !*

Dimitri Tassiaux

-- 
Si tu as une pomme, que j'ai une pomme, et que l'on échange nos pommes, nous
aurons chacun une pomme. Mais si tu as une idée, que j'ai une idée et que
l'on échange nos idées, nous aurons chacun deux idées.
George Bernard Shaw (1856-1950)