Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix date omission in span_range() when exact is True #1205

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rkendra
Copy link

@rkendra rkendra commented Dec 5, 2024

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

  • 🧪 Added tests for changed code.
  • 🛠️ All tests pass when run locally (run tox or make test to find out!).
  • 🧹 All linting checks pass when run locally (run tox -e lint or make lint to find out!).
  • 📚 Updated documentation for changed code.
  • ⏩ Code is up-to-date with the master branch.

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

Fixed an edge case that occurred in span_range() that caused the omission of dates when frame = 'month', exact = True, and start.day > 28.

span_range() now exhibits similar behavior to range() in this case where the returned Arrow object from span() is checked against the start date and updated accordingly.

Closes: #1185

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (403c29f) to head (0f434cb).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1205   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2324      2341   +17     
  Branches       357       359    +2     
=========================================
+ Hits          2324      2341   +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

span_range returns unexpected result (missing days) when using frame month
1 participant