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:
Dirickson Steve <[log in to unmask]>
Reply To:
Dirickson Steve <[log in to unmask]>
Date:
Tue, 22 Sep 1998 15:24:48 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
        <<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.

Steve

ATOM RSS1 RSS2