Just prior to switching to lubridate

Dates in R can be challenging.
myDate <- as.POSIXlt(“20010101”,”%Y%m%d”)
myDate$mday <- myDate$mday + 40

now myDate prints out accurately, but myDate$mday contains 41 days.