[Top][All Lists]

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

Re: Problem with Date Command

From: Philip Rowlands
Subject: Re: Problem with Date Command
Date: Thu, 5 Jun 2008 14:15:26 +0100 (BST)

On Wed, 4 Jun 2008, Dameon G. Rogers wrote:


  I would like to report a problem with the *date* command:

date +%C

does not function properly. It says it displays the current century but the/ definition /of century means that we are in the 21st not the 20th.

The documentation does not state that %C is the ordinal century; in the manpage/--help output, we see:

  %C   century; like %Y, except omit last two digits (e.g., 21)
  %Y   year

and from the info documentation:

     century.  This is like `%Y', except the last two digits are
     omitted.  For example, it is `20' if `%Y' is `2000', and is `-0'
     if `%Y' is `-001'.  It is normally at least two characters, but it
     may be more.

Either the command needs to be changed or the man page needs to be changed to express what the command actually does. Any assistance would be appreciated.

I agree that until 2100, it would be better if the manpage gave "20" as the example, or no example at all, but the wording is strictly correct.


reply via email to

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