Learn R Programming

astrolibR (version 0.1)

juldate: Convert from calendar to Reduced Julian Date

Description

Convert from calendar to Reduced Julian Date

Usage

juldate(date)

Arguments

date
3 to 6-element vector containing year,month (1-12),day, and optionally hour, minute, and second. These are all values of Universal Time. Year should be supplied with all digits. Years B.C should be entered as negative numbers (and note that Year 0 did not exist). If hour, minute or seconds are not supplied, they will default to 0.

Value

jd
Reduced Julian Date, scalar

Details

Julian Day Number is a count of days elapsed since Greenwich mean noon on 1 January 4713 B.C. The Julian Date (JD) is the Julian day number followed by the fraction of the day elapsed since the preceding noon. The output of this function is the Reduced Julian Date
RJD = JD - 2400000.0

The function helio_jd can be used after juldate if a heliocentric Julian date is required. The function daycnv converts dates in the opposite direction from Julian dates to Gragorian calendar dates.

The algorithm is obtained from Sky and Telescope April 1981

See Also

helio_jd daycnv

Examples

Run this code

#  The date of 25-DEC-2006 06:25 UT 
#  Result:   JD = 54094.7673611

juldate(c(2006, 12, 25, 6, 25)) 
juldate(c(2006, 12, 25.2673611)) 

Run the code above in your browser using DataLab