Skip to content

Trailing zeroes in quarter-year parsing now fail to parse #1091

@paleolimbot

Description

@paleolimbot

After the latest release we started getting some test failures in the Arrow R package ( apache/arrow#14615 )...is this intended behaviour? It is a little odd, since the trailing zero on 1.2020 could easily get dropped.

In the previous lubridate:

lubridate::parse_date_time(c(3.2007, 2.1970, 1.2020, 4.2009, 1.1975, NA), "qY")
#> [1] "2007-07-01 UTC" "1970-04-01 UTC" "2020-01-01 UTC" "2009-10-01 UTC"
#> [5] "1975-01-01 UTC" NA

In latest lubridate:

lubridate::parse_date_time(c(3.2007, 2.1970, 1.2020, 4.2009, 1.1975, NA), "qY")
#> Warning: 2 failed to parse.
#> [1] "2007-07-01 UTC" NA               NA               "2009-10-01 UTC"
#> [5] "1975-01-01 UTC" NA

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