arrow-py / arrow-py/arrow

Documentation doesn't mention comparison

Open
#981 3 comments 1 reaction 0 assignees View on GitHub
documentation
Dominant language
Python
Stars
9.1k
Forks
784
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

The documentation does in no way mention that comparison of `Arrow`-objects (and therefore sorting, adding them to a search tree, etc.) is possible. The api reference does not list `__lt__` and `__gt__`, etc.. As dates and timezones are difficult (hence the existence of this library) it is not entirely clear that this is allowed and how it should be handled. Not the most intuitive idea, but it would be possible that dates are compared in local time and not in UTC.

Anyways, comparison is supported

https://github.com/arrow-py/arrow/blob/master/arrow/arrow.py#L1762-L1767

The documentation should either have a subsection "Comparison" or the dunder-methods for comparison should be listed in the api reference (or both). It should be stated how the comparison works, eg. by comparison of some underlying object.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with arrow/arrow.py lines 1762-1767 to verify the comparison behavior, then locate the API reference or documentation section covering Arrow objects. Document that comparison is supported and explain how it works, with the comparison methods listed if appropriate; done means the behavior and relevant methods are discoverable in the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.