Skip to content

Wrong as.period computation with negative intervals #285

Description

@vspinu
end <- ymd('1992-02-28')
start <- ymd_hms('2010-12-05 01:02:03')
int <- new_interval(start, end)
start + as.period(int)
## "1992-02-27 UTC"

The result is exactly one day smaller. I expect it's a wrong computing with days in .int_to_period.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions