Name

CL_dat_cal2jd — Calendar date to Julian Date

Calling Sequence

   [jd] = CL_dat_cal2jd(year[,month[,day[,hour[,minute[,second]]]]])
   
   

Description

  • This function converts a calendar date into a Julian Date (number of fractionnal days since noon UT on January 1st 4713 BC).

    The fractional part of jd (jd-int(jd)) gives the time of the day since noon UT as a decimal fraction of one day with 0.5 representing midnight UT.

  • Last update : 27/6/2008

Parameters

year:

integer. Astronomical year numbering is used, thus 1 BC is 0, 2 BC is -1, 4713 BC is -4712 and 2007 is 2007. (1xN)

month:

(optional) integer in [1,12] (1xN) (default is 1)

day:

(optional) integer between 1 and 28, 29, 30 or 31 following the month of the year (1xN) (default is 1)

hour:

(optional) integer in [0,23] (1xN) (default is 0)

minute:

(optional) integer in [0,59] (1xN) (default is 0)

second:

(optional) real in [0,60) (1xN) (default is 0)

jd:

Julian Date (number of fractionnal days since noon UT on January 1st 4713 BC) (1xN)

Authors

CNES - DCT/SB

Bibliography

1 Explanatory Supplement to the Astronomical Almanac, edited by P. Kenneth Seidelmann. University Science Books, 1992.

2 Orbital Mechanics for Engineering Students, H D Curtis, Chapter 5.4

See also

CL_dat_jd2cal, CL_dat_cal2cjd

Examples

// Example 1
[jd] = CL_dat_cal2jd(2000,1,1,12,0,0)

// Example 2
year=[2004,1996]
month=[5,10]
day=[12,26]
hour=[14,14]
minute=[45,20]
second=[30,0]
jd = CL_dat_cal2jd(year,month,day,hour,minute,second);
[year2,month2,day2,hour2,minute2,second2] = CL_dat_jd2cal(jd);