-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Please could we have maths with timestamps implemented?
In order to implement some of the functionality I'd like in R, I need to be able to do maths with dates. For example:
-
Addition and subtraction: Timestamp + Duration = Timestamp (with and without rollback so have ability to do e.g. 2021-03-30 minus 1 month and either get a null back, or 2021-02-28), plus the ability to specify whether to rollback to the first or last, and whether to preserve or rest the time.
See https://lubridate.tidyverse.org/reference/mplus.html for documentation of the R functionality.
-
Multiplying Durations: Duration * Numeric = Duration
Reporter: Nicola Crane / @thisisnic
Watchers: Rok Mihevc / @rok
Related issues:
- [C++] Support temporal arithmetic ({time,date}{32,64}, timestamp, interval) (duplicates)
- [R] Implement lubridate's %m+%, %m-%, add_with_rollback, and addition and subtraction with timestamp (is depended upon by)
Note: This issue was originally created as ARROW-14947. Please see the migration documentation for further details.