<< CL_co_sph2car Coordinates and frames CL_dat_cal2str >>

CelestLab >> Coordinates and frames > CL_dat_cal2cjd

CL_dat_cal2cjd

Calendar date to modified (1950.0) Julian day

Calling Sequence

cjd = CL_dat_cal2cjd(year,month,day,hour,minute,second)
cjd = CL_dat_cal2cjd(year,month,day)
cjd = CL_dat_cal2cjd(cal) // cal = [year;month;day;hour;minute;second]
cjd = CL_dat_cal2cjd(cal) // cal = [year;month;day]

Description

Parameters

year:

(integer) Year. (1xN or 1x1)

month:

(integer in [1,12]) Month. (1xN or 1x1).

day:

(integer in [1,31]) Day. (1xN or 1x1)

hour:

(optional) Hours. Default is 0. (1xN or 1x1)

minute:

(optional) Minutes. Default is 0. (1xN or 1x1)

second:

(optional) Seconds. Default is 0. (1xN or 1x1)

cal:

Calendar date (3xN or 6xN)

cjd:

Modified (1950.0) Julian day (1xN)

Authors

See also

Examples

// Example 1
cjd = CL_dat_cal2cjd(2000,1,1)
cjd = CL_dat_cal2cjd(2010,2,20,12,3,45)
cjd = CL_dat_cal2cjd([2000;1;1])
cjd = CL_dat_cal2cjd([2010;2;20;12;3;45])

// Example 2
year=[2000,2010]
month=[1,2]
day=[1,20]
hour=[0,12]
minute=[0,3]
second=[0,45]
cjd = CL_dat_cal2cjd(year,month,day,hour,minute,second)
cjd = CL_dat_cal2cjd([year;month;day;hour;minute;second])

Report an issue
<< CL_co_sph2car Coordinates and frames CL_dat_cal2str >>