New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as.period(interval(...)) off by a month #371

Closed
tjmahr opened this Issue Jan 19, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@tjmahr

tjmahr commented Jan 19, 2016

packageVersion("lubridate")
#> [1] ‘1.5.0’

t1 <- "1985-11-24"
t2 <- "2007-08-13"
as.period(interval(t1, t2))
#> [1] "21y 9m 19d 23H 0M 0S"

But the amount of time between the two dates is 21 years, 8 months, 20 days.

@vspinu

This comment has been minimized.

Member

vspinu commented Jan 20, 2016

This is a bug. Wrong computation with months.I am a bit surprised this went though unnoticed in our tests.

@vspinu vspinu added the bug label Jan 20, 2016

@vspinu vspinu closed this in d6eb225 Mar 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment