-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-14819: [R] Binding for lubridate::qday #13440
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
Changes from all commits
3b90e25
e0676b0
05c8a24
b018e3c
3247ce8
37ebd87
ef84a7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -574,6 +574,26 @@ test_that("extract yday from timestamp", { | |
| ) | ||
| }) | ||
|
|
||
| test_that("extract qday from timestamp", { | ||
| test_df <- tibble::tibble( | ||
| time = as.POSIXct(seq(as.Date("1999-12-31", tz = "UTC"), as.Date("2001-01-01", tz = "UTC"), by = "day")) | ||
| ) | ||
|
|
||
| compare_dplyr_binding( | ||
| .input %>% | ||
| transmute(x = qday(time)) %>% | ||
| collect(), | ||
| test_df | ||
|
||
| ) | ||
|
|
||
| compare_dplyr_binding( | ||
| .input %>% | ||
| transmute(x = qday(as.POSIXct("2022-06-29 12:35"))) %>% | ||
| collect(), | ||
| test_df | ||
| ) | ||
| }) | ||
rok marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| test_that("extract hour from timestamp", { | ||
| compare_dplyr_binding( | ||
| .input %>% | ||
|
|
@@ -790,6 +810,26 @@ test_that("extract yday from date", { | |
| ) | ||
| }) | ||
|
|
||
| test_that("extract qday from date", { | ||
| test_df <- tibble::tibble( | ||
| date = seq(as.Date("1999-12-31"), as.Date("2001-01-01"), by = "day") | ||
| ) | ||
|
|
||
| compare_dplyr_binding( | ||
| .input %>% | ||
| mutate(x = qday(date)) %>% | ||
| collect(), | ||
| test_df | ||
rok marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ) | ||
|
|
||
| compare_dplyr_binding( | ||
| .input %>% | ||
| mutate(y = qday(as.Date("2022-06-29"))) %>% | ||
| collect(), | ||
| test_df | ||
| ) | ||
| }) | ||
|
|
||
rok marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| test_that("leap_year mirror lubridate", { | ||
| compare_dplyr_binding( | ||
| .input %>% | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.