rok commented on code in PR #13440:
URL: https://github.com/apache/arrow/pull/13440#discussion_r923873308


##########
r/R/dplyr-funcs-datetime.R:
##########
@@ -209,6 +209,13 @@ register_bindings_datetime_components <- function() {
     build_expr("month", x)
   })
 
+  register_binding("lubridate::qday", function(x) {
+    # We calculate day of quarter by flooring timestamp to beginning of 
quarter and
+    # calculating days between beginning of quarter and timestamp/date in 
question.
+    floored_x <- build_expr("floor_temporal", x, options = list(unit = 9L))
+    build_expr("days_between", floored_x, x) + Expression$scalar(1L)

Review Comment:
   @jonkeane that's a fair question especially since documentation on `qday` is 
not really available.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to