Skip to content

make_datetime() failed to add one day with the last day of month and 24-hour #1098

Closed
@hongyuanjia

Description

@hongyuanjia

With PR #1078, make_datetime() behaves differently than the previous version. I believe this is a regression, since the previous CRAN version (v1.8.0) gives the "correct" answer.

remotes::install_version("lubridate", "1.8.0") # Previous version
lubridate::make_datetime(month = 1, day = 31, hour = 24)
# [1] "1970-01-02 UTC"

remotes::install_version("lubridate", "1.9.0") # CRAN version
lubridate::make_datetime(month = 1, day = 31, hour = 24)
# [1] "1970-01-31 UTC"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions