CL_dat_cal2cjd — Calendar date to CNES Julian Day
[cjd] = CL_dat_cal2cjd(year[,month[,day[,hour[,minute[,second]]]]])
The fractional part of cjd (cjd-int(cjd)) gives the time of the day as a decimal fraction of one day with 0.5 representing midday UT.
ATTENTION: this algorithm is only valid for dates before 28 February 2100, because of the calculation over the leap years (with modulo). With the taken margin, it accepts only dates before 01-01-2100 at 0 hours.
integer in [1950,2099] (1xN)
(optional) integer in [1,12] (1xN) (default is 1)
(optional) integer between 1 and 28, 29, 30 or 31 depending on the month of the year (1xN) (default is 1)
(optional) integer in [0,23] (1xN) (default is 0)
(optional) integer in [0,59] (1xN) (default is 0)
(optional) real in [0,60) (1xN) (default is 0)
Cnes Julian Date (number of fractionnal days since January 1st 1950) (1xN)
// Example 1 cjd = CL_dat_cal2cjd(1968,2,29,0,0,0) // february 29 1968 // Example 2 day = [29 5 28]; month = [2 4 2]; year = [1968 1980 1986]; hour = [0 12 4]; minute = [0 30 20]; second = [0 5 12]; cjd = CL_dat_cal2cjd(year,month,day,hour,minute,second); [year2,month2,day2,hour2,minute2,second2] = CL_dat_cjd2cal(cjd);