tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Andre Paige <apaige () idulab ! gov>
To: tru64-unix-managers
Subject: SUMMARY JULIAN DATE
Date: Fri, 20 Sep 1996 15:01:08 +0000	[thread overview]
Message-ID: <96076339121600.tru64-unix-managers.marc@archive.invalid> (raw)

I want to thank the following individual for showing me how to display
the 
what I had thought to be the julian date.  Little did I know that even
in school one does not learn the truth.

The answer for the UNIX system was:	 date +%j
Input from the field:

Woody Lee <fastest to respond with query and answer>
	date +%j

Richard Turner  <little history lesson>
	<TRUE Julian date (i.e. numbers of days since noon on some day in 1857
or some year
		like that) >
Jon Reeves <true to form - found it there>
	<date +%j (Julian date within year -- consult date(1) man page for
other
		formatting options)>

Andrew Weston  <yes>
	<Do you mean the date command: date +%j>

Lucio Chiappetti <Must have looked it up? or is a computer himself>
<  If you mean the *TRUE* Julian Day Number, as defined by the
  International Astronomical Union, i.e. the elapsed days from 12 UT
  of 1 Jan 4713 B.C., you need the following subroutine :

C
C     SUBROUTINE JAYDAY FROM MSSL XRAY PACKAGE
C
      SUBROUTINE JAYDY(JY,JM,JD,JNL)
C     CALENDAR TO JD DATE
      INTEGER *4 JNL,ITEMP1
      MY=JY
      MM=JM
      IF(MM-2)11,11,12
11    MM=MM+9
      MY=MY-1
      GOTO13
12    MM=MM-3
13    CONTINUE
      ITEMP1=MY
      JNL=15078+(1461*ITEMP1)/4+(153*MM+2)/5+JD
      RETURN
      END
 
If you mean the sequence number of the day in the current year (but
*PLEASE*
*PLEASE* *PLEASE* do *NOT* call it "julian date" ! It has nothing to do
with
it !) you can do

 date +j
>

Once more I want to thank all those that responded.

Sincerely,

Andre' A.B. Paige

                 reply	other threads:[~1996-09-20 15:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox