jonkeane commented on code in PR #13440: URL: https://github.com/apache/arrow/pull/13440#discussion_r923805105
########## 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: This is extremely minor, and take it or leave it: but it did take me a second to think through why we are adding 1 here. Maybe we could add it to the comment up above? -- 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