date.mdy {date}R Documentation

Convert from Julian dates to month, day, and year

Usage

date.mdy(sdate, weekday = FALSE)

Arguments

sdate a Julian date value, as returned by mdy.date(), number of days since 1/1/1960.
weekday if TRUE, then the returned list also will contain the day of the week (Sunday=1, Saturday=7).

Value

a list with components month, day, and year.

References

Press, et. al., ``Numerical Recipies''.

Examples

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")
}

[Package Contents]