Davis Vaughan
Davis Vaughan
As of right now, `vec_math()` isn't being called for lubridate objects. I don't _think_ this currently has much to do with vctrs? I would imagine it is falling through to...
You can do this with clock. It takes the same approach as readr where you can supply a locale object containing the localized month/weekday names. `clock_labels("de")` doesn't seem to exactly...
This is an error by default in clock, which provides multiple ways to resolve the _invalid date_: ``` r library(clock) x Error: Invalid date found at location 1. #> ℹ...
I imagine this works correctly with clock, since we don't do anything with regular expressions: ``` r library(clock) dt [1] ene. ene. ene. ene. ene. ene. #> 12 Levels: ene....
With clock: ``` r library(clock) library(magrittr) x [1] "2018-11-01 -03" # Find a monday, which is what timechange uses as an origin origin [1] "2018-10-29 -03" ``` Created on 2021-05-25...
Works with clock's year-day type since, by design, you can't update multiple components at once ``` r library(clock) library(magrittr) x % as_year_day() x #> #> [1] "2009-245" x % set_year(2008)...
In clock, this is an error by default, with multiple options for resolving these _invalid dates_ ``` r library(clock) x Error: Invalid date found at location 1. #> ℹ Resolve...
You can do this with clock's iso-year-week-day calendar type ``` r library(clock) library(magrittr) ywd % as_iso_year_week_day() ywd #> #> [1] "2015-W53-6" # Grouping by the ISO week component ywd %>%...
One benefit of clock's types are that they can handle sub second units without loss of precision: ``` r library(clock) x [1] "2009-10-09 08:07:06.230" # Expected behavior here (this is...
This also works correctly in clock. You have to use a clock type, which truly supports sub second precision date-times. ``` r library(clock) library(magrittr) t [1] "1969-12-31 23:59:49.968" "1969-12-31 23:59:50.001"...