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.
nJD = CalcJD( sDate, sTime )
where
sDate, sTime are the UT date and time strings to convert to Julian Date.
nJD is the Julian Date (e.g., 2441552.645325).
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.
The following script converts UT date and time, given as strings, to the Julian Date:
|
-- 23 April 2007 UT |
|
-- 02:15:30.5 UT |
|
-- calculate the Julian Date |
|
-- Result: JD = 2454213.594103 |