GNU bug report logs - #17765
julian date is not what you think

Previous Next

Package: coreutils;

Reported by: Steve Zornes <boardstretcher <at> gmail.com>

Date: Thu, 12 Jun 2014 17:28:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Steve Zornes <boardstretcher <at> gmail.com>
Cc: 17765 <at> debbugs.gnu.org
Subject: bug#17765: julian date is not what you think
Date: Thu, 12 Jun 2014 20:04:16 +0100
tag notabug 17765
close 17765
stop

On 06/12/2014 05:56 PM, Steve Zornes wrote:
> the date command uses %j to specify number of days since beginning of year. It looks as though %j is meant to mean Julian day which is ACTUALLY the number of days since the julian calendar started. Currently 2,000,000 or so.
> number of days since the beginning of the year is called ordinal date and should be specified with a %o 
> just a thought. 		 	   		  

Stricktly you are correct, though calendars with the
ordinal day listed are often referred to julian calendars.
There is a long history of specifying this with %j.
See strftime, cal -j, etc.
So while %o is available, it's not worth the trouble to use for this IMHO.
In any case you wouldn't start changing this in date(1),
rather the POSIX standards for strftime() etc.
But again I don't think this is practical.

thanks,
Pádraig.




This bug report was last modified 10 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.