You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/10 04:19:53 UTC

[GitHub] [arrow] djnavarro commented on pull request #12154: ARROW-14821: [R] Implement bindings for lubridate's floor_date, ceiling_date, and round_date

djnavarro commented on pull request #12154:
URL: https://github.com/apache/arrow/pull/12154#issuecomment-1063649371


   @rok sorry for not getting to this earlier!
   
   For the `week_start` issue: if I'm reading it correctly, we may need a little more flexibility on the C++ side to allow the user to specify an integer between 1 (Monday) and 7 (Sunday). For example, this is the `lubridate::floor_date()` behaviour:
   
   ```r
   this_thursday <- ymd("2022-03-10")
   floor_date(this_thursday, unit = "week", week_start = 1)  # returns "2022-03-07"
   floor_date(this_thursday, unit = "week", week_start = 2)  # returns "2022-03-08"
   ```
   
   It's still possible I can handle it at the level of the R binding (I've learned a bit more in the last couple of month!) but I'm wondering if the R level is the best place to do this or if it's better to implement it at the C++ level?
   
   For the `change_on_boundary` issue: my intuition is that this is best implemented as part of the R binding because the "behaviour of ceiling at the boundary" feels so specific to lubridate? As far as I can tell though it's still blocked because there's no way to add +1 time unit to a temporal object, right? (Or am I missing something???)


-- 
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-unsubscribe@arrow.apache.org

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