G??ran Brostr??m <gb at stat.umu.se> writes:
I have a problem with some functions handling dates, in packages 'date' and
'survival' (they seem to be identical). For instance, from the documentation,
--------------------
mdy.date {survival}
R Documentation
Convert to Julian Dates
Description
Given a month, day, and year, returns the number of days since January 1, 1960.
Usage
mdy.date(month, day, year, nineteen = TRUE, fillday = FALSE,
fillmonth = FALSE)
----------------------------
but
library(survival)
mdy.date(12, 1, 1977)
[1] 1Dec77
Similar strange results appear in other date-related functions. I plan to
write functions that converts, eg, "1977-01-31" to the real number 1977.084
and back. What function in R does what 'mdy.date' claims to do?
dput(mdy.date(12, 1, 1977))
structure(6544, class = "date")