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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17765 in the body.
You can then email your comments to 17765 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#17765; Package coreutils. (Thu, 12 Jun 2014 17:28:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Zornes <boardstretcher <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 12 Jun 2014 17:28:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steve Zornes <boardstretcher <at> gmail.com>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: julian date is not what you think
Date: Thu, 12 Jun 2014 16:56:25 +0000
[Message part 1 (text/plain, inline)]
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. 		 	   		  
[Message part 2 (text/html, inline)]

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Thu, 12 Jun 2014 19:04:03 GMT) Full text and rfc822 format available.

Notification sent to Steve Zornes <boardstretcher <at> gmail.com>:
bug acknowledged by developer. (Thu, 12 Jun 2014 19:04:03 GMT) Full text and rfc822 format available.

Message #10 received at 17765-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Steve Zornes <boardstretcher <at> gmail.com>, 17765-done <at> debbugs.gnu.org
Subject: Re: bug#17765: julian date is not what you think
Date: Thu, 12 Jun 2014 13:03:47 -0600
[Message part 1 (text/plain, inline)]
On 06/12/2014 10:56 AM, 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. 		 	   		  
> 

Please read the discussion at
https://lists.gnu.org/archive/html/coreutils/2013-10/msg00019.html

There are two different definitions for Julian date.  POSIX has
standardized %j to mean the count of days within a Gregorian year, and
NOT the astronomical Julian date.
http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm

We are reluctant to burn %o without it being required by POSIX, because
strftime letters are already sparse; this is particularly true of
burning a letter to be a synonym to an already standardized letter.  The
proposal in the thread mentioned above would be to add a %J as the
Astronomical Julian date, if there proves to be enough demand, but so
far, no one has expressed enough interest to actually write the patch.

Therefore, I'm closing this as not a bug, although you can feel free to
add further replies to the thread.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#17765; Package coreutils. (Thu, 12 Jun 2014 19:05:02 GMT) Full text and rfc822 format available.

Message #13 received at 17765 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Steve Zornes <boardstretcher <at> gmail.com>
Cc: 17765 <at> debbugs.gnu.org
Subject: Re: 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.




Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Thu, 12 Jun 2014 19:09:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Jul 2014 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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