Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coercing time points to Date and POSIXct should floor, not cast #205

Closed
DavisVaughan opened this issue Apr 7, 2021 · 0 comments · Fixed by #208
Closed

Coercing time points to Date and POSIXct should floor, not cast #205

DavisVaughan opened this issue Apr 7, 2021 · 0 comments · Fixed by #208
Labels
bug an unexpected problem or unintended behavior

Comments

@DavisVaughan
Copy link
Member

library(clock)

# review other usage of time_point_cast()

# should floor to day
as.Date(naive_time_parse("1969-01-01 01:01:01"))
#> [1] "1969-01-02"

# should floor to second
as.POSIXct(naive_time_parse("1969-01-01 01:01:01.123", precision = "millisecond"))
#> [1] "1969-01-01 01:01:02 EST"

Created on 2021-04-07 by the reprex package (v1.0.0)

@DavisVaughan DavisVaughan added the bug an unexpected problem or unintended behavior label Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant