Convert from Julian Dates to Month, Day, and Year
Convert a vector of Julian dates to a list of vectors with the corresponding values of month, day and year, and optionally weekday.
date.mdy(sdate, weekday = FALSE)
sdate |
a Julian date value, as returned by |
weekday |
if |
A list with components month
, day
, and year
.
Press, W. H., Teukolsky, S. A., Vetterling, W. T., and Flannery, B. P. (1992). Numerical Recipes: The Art of Scientific Computing (Second Edition). Cambridge University Press.
day <- 7 temp <- date.mdy(mdy.date(month = 7, day = day, year = 1960)) ## Check for illegal dates, such as 29 Feb in a non leap year if (temp$day != day) { cat("Some illegal dates\n") } else { cat("All days are legal\n") }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.