CalcJD


The CalcJD function calculates the Julian Date from date and time components (year, month, day, hour, minute, and seconds). Date and time are specified in Universal Time ("UT", also known as GMT). To get the Heliocentric Julian Date, use CalcHJD.

Syntax

nJD = CalcJD( sDate, sTime )

bullet.gif    sDate, sTime are the UT date and time strings to convert to Julian Date.

bullet.gif    nJD is the Julian Date (e.g., 2441552.645325).

Remarks

To split the Julian Date into its date and time components, use ParseJD. To split the Julian Date into date and time strings, use JDtoDateTime.

Example

The following script converts UT date and time, given as strings, to the Julian Date:

 

sDate = "2007, 4, 23"

-- 23 April 2007 UT

sTime = "2 15 30.5"

-- 02:15:30.5 UT

nJD = CalcJD( sDate, sTime )

-- calculate the Julian Date

Printf("JD = %14.6lf\r\n", nJD )

-- Result: JD = 2454213.594103

Related Topics

FormatYmdStr

JDtoDateTime

CalcMJD

ParseJD

CalcHJD


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.