Skip to content

Commit

Permalink
Tidy up the docstring for icalendar.prop.vPeriod
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy committed Nov 21, 2024
1 parent 32c5049 commit 921ad52
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/icalendar/prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,17 +766,20 @@ class vPeriod(TimeBase):
Example: The period starting at 18:00:00 UTC, on January 1, 1997 and
ending at 07:00:00 UTC on January 2, 1997 would be:
19970101T180000Z/19970102T070000Z
.. code-block:: text
The period start at 18:00:00 on January 1, 1997 and lasting 5
hours and 30 minutes would be:
19970101T180000Z/19970102T070000Z
19970101T180000Z/PT5H30M
The period start at 18:00:00 on January 1, 1997 and lasting 5 hours
and 30 minutes would be:
.. code-block:: text
19970101T180000Z/PT5H30M
>>> from icalendar.prop import vPeriod
>>> period = vPeriod.from_ical('19970101T180000Z/19970102T070000Z')
>>> period = vPeriod.from_ical('19970101T180000Z/PT5H30M')
"""

def __init__(self, per):
Expand Down

0 comments on commit 921ad52

Please sign in to comment.