Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions arrow/arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,8 @@ def ceil(self, frame: _T_FRAMES, **kwargs: Any) -> "Arrow":
def span_range(
cls,
frame: _T_FRAMES,
start: dt_datetime,
end: dt_datetime,
start: Union["Arrow", dt_datetime],
end: Union["Arrow", dt_datetime],
tz: Optional[TZ_EXPR] = None,
limit: Optional[int] = None,
bounds: _BOUNDS = "[)",
Expand Down Expand Up @@ -702,8 +702,10 @@ def span_range(
"""

tzinfo = cls._get_tzinfo(start.tzinfo if tz is None else tz)
start = cls.fromdatetime(start, tzinfo).span(frame, exact=exact)[0]
end = cls.fromdatetime(end, tzinfo)
start = cls.fromdatetime(cls._get_datetime(start), tzinfo).span(
frame, exact=exact
)[0]
end = cls.fromdatetime(cls._get_datetime(end), tzinfo)
_range = cls.range(frame, start, end, tz, limit)
if not exact:
for r in _range:
Expand All @@ -725,8 +727,8 @@ def span_range(
def interval(
cls,
frame: _T_FRAMES,
start: dt_datetime,
end: dt_datetime,
start: Union["Arrow", dt_datetime],
end: Union["Arrow", dt_datetime],
interval: int = 1,
tz: Optional[TZ_EXPR] = None,
bounds: _BOUNDS = "[)",
Expand Down
Loading