Skip to content

Commit

Permalink
feat: OffsetDateTime (#262)
Browse files Browse the repository at this point in the history
* feat: `OffsetDateTime`

* test: more `from_aware_datetime` coverage
  • Loading branch information
chrisimcevoy authored Feb 3, 2025
1 parent 6329e0c commit 7ea5220
Show file tree
Hide file tree
Showing 3 changed files with 796 additions and 40 deletions.
4 changes: 2 additions & 2 deletions pyoda_time/_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ def from_timedelta(cls, timedelta: datetime.timedelta) -> Offset:
"""Converts the given ``timedelta`` to an offset, with fractional seconds truncated.
:param timedelta: The timedelta to convert
:returns: An offset for the same time as the given timedelta. :exception ValueError: The given timedelta falls
outside the range of +/- 18 hours.
:returns: An offset for the same time as the given timedelta.
:raises ValueError: The given timedelta falls outside the range of +/- 18 hours.
"""
# TODO: Consider introducing a "from_microseconds" constructor?

Expand Down
Loading

0 comments on commit 7ea5220

Please sign in to comment.