daycnv: Convert Julian dates to Gregorian calendar dates

Description Usage Arguments Details Value Author(s) Examples

Description

Convert Julian dates to Gregorian calendar dates

Usage

1
daycnv(xjd)

Arguments

xjd

Julian Date [scalar or vector]

Details

If the input xjd is a vector, then the outputs (yr,mn,day, and hr) will be vectors of the same length.

Uses the algorithm of Fliegel and Van Flandern (1968) as reported in the "Explanatory Supplement to the Astronomical Almanac" (1992), p. 604 Works for all Gregorian calendar dates with XJD > 0, i.e., dates after -4713 November 23. Be sure that the Julian date is specified as double precision to maintain accuracy at the fractional hour level.

Other conversions and manipulations of Julian dates are provided by the CRAN packages chron and dates.

Value

yr

year (integer)

mn

month (integer)

day

day (integer)

hr

hours and fractional hours (real)

Author(s)

Converted to IDL from Yeoman's Comet Ephemeris Generator, B. Pfarr, STX, 1988

R adaptation by Arnab Chakraborty (June 2013)

Examples

1
daycnv(2440000.0)  # 1200 on May 23 1968

Example output

$yr
[1] 1968

$mn
[1] 2

$day
[1] 0

$hr
[1] 12

astrolibR documentation built on May 2, 2019, 3:26 a.m.