
Convert year, month, day to 0h on Julian day.
ymd2jd(yr = 2012, mo = 1, dy = 1)
UT1 Year
UT1 Month number
UT1 Day number
Julian date
Returns Julian date of 0 hours on the specified day. To get to noon on day, the time origin of Julian days, add 0.5.
Fliegel & Van Flandern, Comm. ACM 10, 657 (1968), whose algorithm uses FORTRAN integer mathematics. See also the Explanatory Supplement to the Astronomical Almanac, ed. P.K. Seidelmann, c. 1992.
# NOT RUN {
# Ensure enough digits to see result, then return to previous value
dig <- getOption('digits')
options(digits=16)
ymd2jd(yr=2000, mo=1, dy=1)
ymd2jd(yr=2000, mo=1, dy=1.3) # rounds to nearest day
options(digits=dig)
jd2ymd(ymd2jd(yr=2000, mo=1, dy=1))
# }
Run the code above in your browser using DataLab