Add Support For Custom span_range values
Need to create a function to grab all data points between time span ranges. It would be pretty cool to allow for span_ranges of 'minutes=90', or something of the sort.
+1
+1
This would be nice to add to the lib. Welcome any PR attempts
My classmate and I would like to take a look at this issue, if it is still relevant. We were thinking about implementing the solution using the shift() function, but wanted to get an opinion and see if it is even a possible approach. Let me know! Thanks!
EDIT: We figured the shift() function would help with using custom ranges
Hello @kdeodhar16, thank you for your interest in contributing to arrow.
A quick look over the code points to span_range using span under the hood. Messing around with the count arg gave me something similar to what we'd like to accomplish in span_range.
(arrow) chris@ThinkPad:~/arrow$ python
Python 3.7.4 (default, Sep 19 2019, 11:01:37)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import arrow
>>> start=arrow.utcnow().floor('hour')
>>> start
<Arrow [2020-04-16T15:00:00+00:00]>
>>> start.span('minute', count=90)
(<Arrow [2020-04-16T15:00:00+00:00]>, <Arrow [2020-04-16T16:29:59.999999+00:00]>)
Maybe we can use this as a solution, but I'm interested to hear your idea for using shift.
Hi @systemcatch, I am working with @kdeodhar16 on this task as well and was actually thinking something similar to this! Looking at how span_range works using span, it seemed to me like the best way to accomplish this is to create a new function that uses .span in the way you did up there and we are now testing what we have to see if it works properly. Thanks!