Unit 'DateUtils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#rtl]

DateTimeToModifiedJulianDate

Convert a TDateTime value to a modified Julian date representation.

Declaration

Source position: dateutil.inc line 425

function DateTimeToModifiedJulianDate(

  const AValue: TDateTime

):Double;

Arguments

AValue

  

TDateTime value to convert to Modified Julian representation.

Function result

Modified Julian representation of AValue.

Description

Modified Julian dates are commonly used by astronomers, geodesists, and historians. The date convention is designed to facilitate chronological calculations, numbers all days in consecutive fashion, beginning at a date sufficiently far into the past so as to precede the historical period.

It represents the number of days since November 17, 1858 and is derived by subtracting 2400000.5 days from a Julian Day Number. Julian Day Number is an integer counter of the days beginning at noon 1 January 4713 B.C., or Julian Day Number 0. The Julian Date is simply the extension of the Day Number to include a real fraction of day, allowing a continuous time unit.

MJD modifies this Julian Date in two ways. The MJD begins at midnight rather than noon, in keeping with more standard conventions. Secondly, for simplicity, the first two digits of the Julian Date are removed. This is because, for some three centuries following 17 November 1858, the Julian day lies between 2400000 and 2500000. The MJD drops those first "24" digits. Thus, MJD = JD - 2400000.5.

See also

DateTimeToJulianDate

  

Converts a TDateTime value to a Julian date representation.

JulianDateToDateTime

  

Convert a Julian date representation to a TDateTime value.

TryJulianDateToDateTime

  

Convert a Julian date representation to a TDateTime value.

TryModifiedJulianDateToDateTime

  

Convert a modified Julian date representation to a TDateTime value.


Documentation generated on: Jul 25 2025