Skip to content

Commit

Permalink
Apply suggestion from review
Browse files Browse the repository at this point in the history
  • Loading branch information
wiget committed Nov 21, 2024
1 parent d9a6917 commit ae719c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pendulum/parsing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ def _parse_iso8601_interval(text: str) -> _Interval:
first, last = text.split("/")
start = end = duration = None

if first[0:1] == "P":
if first[:1] == "P":
# duration/end
duration = parse_iso8601(first)
end = parse_iso8601(last)
elif last[0:1] == "P":
elif last[:1] == "P":
# start/duration
start = parse_iso8601(first)
duration = parse_iso8601(last)
Expand Down

0 comments on commit ae719c6

Please sign in to comment.