🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3292

Re: Calculating Julian Time...

#3292
From: Jim Scotti x2717
Date: Tue, 04 Dec 1990 04:22
31 lines
1847 bytes
In article <2226.2758fb1a@iccgcc.decnet.ab.com> gardner@iccgcc.decnet.ab.com writes:
>I am writing an accounting application which needs to calculate a specific
>julian date and time...  I have scrambled through my manuals, magazines, 
>old physics books to find an algorithm, but to no avail!  The only information
>I could find was creating a julian date using MONTH, DAY and YEAR... without
>any mention of a specific HOUR, MINUTE and SECOND on that date... Does anyone
>have any suggestions (... or better yet ALGORITHMS)?  
>
>				Thanks,
>					Mike Gardner
>					Summit Software Engineering

When calculating the julian date, the DAY should include the fraction of a
day computed by:

	DAY = Dayofmonth + (HOUR + MINUTE/60 + SECOND/3600)/24

The HOUR should be corrected to Universal Time before this calculation.
For example, the UT HOUR is MST+7hrs or EST+5hrs, etc.

The DAY could be stored to 5 decimals which would produce slightly better
than 1 second precision.

Julian dates start at 0.5 at 00:00:00 UT, so 12:00:00 UT is 1.0.   

I do not have any actual algorithms handy, but it sounds like you may have
found one which should be easy to implement.  If you need to test your
algorithm, 1990 Dec. 3, 21:30:15 (MST) is 1990 Dec. 4, 04:30:15 UT is julian
date 2448229.68767.

Jim.
Technical Details
Message-ID: <619@organpipe.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!ncar!noao!amethyst!organpipe!hindmost!jscotti
References: <2226.2758fb1a@iccgcc.decnet.ab.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!ncar!noao!amethyst!organpipe!hindmost!jscotti
From: jscotti@lpl.arizona.edu (Jim Scotti x2717)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Calculating Julian Time...
Keywords: Julian Dates
Message-ID: <619@organpipe.UUCP>
Date: 4 Dec 90 04:22:04 GMT
References: <2226.2758fb1a@iccgcc.decnet.ab.com>
Sender: news@organpipe.UUCP
Organization: Lunar & Planetary Laboratory, Tucson AZ.
Lines: 31