Skip to content

Documentation doesn't explain rounding functions accept a Period for unit #931

@yutannihilation

Description

@yutannihilation

Rounding functions (e.g. round_date()) accepts a Period object as unit argument, but this usage is not described in https://lubridate.tidyverse.org/reference/round_date.html. As unit accepts arbitrary strings that can be parsed into period, I guess passing Period objects is a valid usage. Is my understanding correct? If so, may I send a pull request to add some sentences about this to the doc?

library(lubridate, warn.conflicts = FALSE)

ceiling_date(today() + 1:7, days(3))
#> [1] "2020-11-07" "2020-11-07" "2020-11-07" "2020-11-10" "2020-11-10"
#> [6] "2020-11-10" "2020-11-13"

Created on 2020-11-03 by the reprex package (v0.3.0)

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