Commits


Dragoș Moldovan-Grünfeld authored and Jonathan Keane committed 9719eae66dc
ARROW-14808 [R] Implement bindings for `lubridate::date()` The following will be supported in arrow (`base::as.Date()` included to show the difference to `date()`, but not supported): ``` r library(dplyr) library(lubridate) df <- tibble(a = as.POSIXct("2012-03-26 23:12:13", tz = "America/New_York")) df %>% mutate( a_date = date(a), a_date_base = as.Date(a)) #> # A tibble: 1 × 3 #> a a_date a_date_base #> <dttm> <date> <date> #> 1 2012-03-26 23:12:13 2012-03-26 2012-03-27 ``` ``` r library(arrow) library(dplyr) library(lubridate) df <- tibble(a = as.POSIXct("2012-03-26 23:12:13", tz = "America/New_York")) df %>% arrow_table() %>% mutate( a_date = date(a) ) %>% collect() #> # A tibble: 1 × 2 #> a a_date #> <dttm> <date> #> 1 2012-03-26 23:12:13 2012-03-26 ``` <sup>Created on 2022-02-15 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)</sup> Closes #12433 from dragosmg/lubridate_date Authored-by: Dragoș Moldovan-Grünfeld <dragos.mold@gmail.com> Signed-off-by: Jonathan Keane <jkeane@gmail.com>