HP3000-L Archives

September 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Tue, 22 Sep 1998 18:39:28 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
Steve Dirickson writes:

>
>          <<Yes, I want to modified julian date.>>
>
>
>  For years between 1901AD and 2099AD inclusive, the Modified Julian Date is
>  calculated as
>
>    MJD = -678972 + 367 * Y - 7 * (Y + (M + 9) intdivide 12) intdivide 4 - 3
*
>  ((Y + (M - 9) intdivide 7) intdivide 100 + 1) intdivide 4 + 275 * M
>  intdivide 9 + D + UT floatdivide 24
>
>  'Y' is the integer value of the year, 'M' is the month (1-12), and D is the
>  day of the month, 1-31. 'UT' is supposed to the current universal time, UT,
>  in decimal hours. However, since most of us normal (or mostly-normal)
humans
>  don't have access to up-to-date UT1 values, you can use UTC instead.
>  'intdivide' indicates integer division, where the remainder is dropped and
>  not carried forward into later calculations; 'floatdivide' is, surprisingly
>  enough, floating-point division where the remainder becomes the
>  fractional-day component of the result. This formula ignores leap-seconds,
>  unless incorporated into the 'UT' value used; if you need better accuracy,
>  include them as appropriate.
>
>  As an even greater simplification, for dates in 1997,
>    MJD = 50448 + DOY
>
>  Where 'DOY' is the day of the year, 1-365.

I must admit that I'm confused, Steve, particularly so about the offset value
of 50,448. Most people use January 1, 1900 as the start of their Julian Date
calendar, that being Day 1, although any date can be used, so long as you're
consistent. But if January 1, 1997 is to be 50,449, then counting backwards,
the reference date falls in the middle of the year 1858. Why start there?

Or is there an error lurking somewhere unseen in the algorithm?

Wirt Atmar

ATOM RSS1 RSS2