Skip to content
Prev 221576 / 398500 Next

Question about difftime()

Dear R experts,

I have a question about the result of difftime() function: Does it
take into account the different number of days in each month. In my
example, I have the following:
[1] "2010-02-20"
[1] "2010-05-20 16:00:00"
Time difference of 89.625 days
When I count the days I get 88 days from 20/02/2010 to 20/05/2010
consequently the difference in days should be 87.

On the contrary, difftime gives a higher number, so I doubt whether it
takes into account the fact that february has 28 days (or 29). Could
you please help?

Thank you very much in advance.

Kind regards,
Stella

--
Stella Pachidi
Master in Business Informatics student
Utrecht University