Convert a julian date into standard a date format

Share:

Description

Convert a julian date into a standard calendar date format

Usage

1

Arguments

x

julian date; that is, the number of days since day 0 (default is 1970-01-01)

Details

In R, the julian function converts a date-time object into a Julian date: the number of day since day 0 (default is 1970-01-01). However, there is no function, without loading another package, that converts a Julian date back into a date object. The julian2date function does this conversion.

Value

Return standard calendar date format.

Note

Visit http://medepi.com for the latest.

Author(s)

Tomas Aragon, aragon@berkeley.edu, http://www.medepi.com

References

none

See Also

format.Date, weekdays

Examples

1
2
3
4
5
6
mydates <- c("1/1/04", "1/2/04", "1/7/04", "1/14/04", "8/18/04");
mydates <- as.Date(mydates, format = "%m/%d/%y")
mydates
myjulian <- julian(mydates)
myjulian
julian2date(myjulian)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.