0

When I write

x <- c('2007-05-05', '2006-12-31')
strptime(x, "%Y-%m-%d")$year

I get the result

[1] 107 106

I thought that POSIXlt started at 1970, but this appears to start at 1900?

2

The documentation says

POSIXct

represents the (signed) number of seconds since the beginning of 1970 (in the UTC time zone) as a numeric vector.

POSIXlt

is a named list of vectors and the year means: years since 1900

Not the answer you're looking for? Browse other questions tagged or ask your own question.