Skip to content

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

Description

@tjmahr
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions