Skip to content

pretty_dates crashes for intervals greater than one year #227

@garrettgman

Description

@garrettgman

From David A.

pretty_dates fails to compute the intervals whenever it has to extend beyond intervals of 1 year. Consider the example:

pretty_dates(c(as.Date("1993-12-05"), as.Date("2007-12-01")), 14)
As expected, it returns "1993-01-01 UTC", "1994-01-01 UTC", etc.

Now change the third argument to 7 instead of 14.
pretty_dates(c(as.Date("1993-12-05"), as.Date("2007-12-01")), 7)
One would expect "1993-01-01 UTC", "1995-01-01 UTC", etc., but instead it crashes.

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