diff options
author | Alex Willmer <alex@moreati.org.uk> | 2015-09-06 10:51:49 +0100 |
---|---|---|
committer | Alex Willmer <alex@moreati.org.uk> | 2015-09-06 10:51:49 +0100 |
commit | 7b907d7940f4d6f39d42ed9aabb42b08f11efda5 (patch) | |
tree | a60a16312fc06654dc45000b568533375c230607 /docs | |
parent | ceb60f06e2e7ece138afb44f45c28ff54fe7d247 (diff) | |
download | dateutil-7b907d7940f4d6f39d42ed9aabb42b08f11efda5.tar.gz |
Fix tzical() doctest, add docs/samples/EST5EDT.ics
This commit moves the EST5EDT example to a seperate file, so the doctest can
readit. The example is still rendered in the final documentation.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples.rst | 23 | ||||
-rw-r--r-- | docs/samples/EST5EDT.ics | 19 |
2 files changed, 22 insertions, 20 deletions
diff --git a/docs/examples.rst b/docs/examples.rst index 34d64cc..d3d6c40 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1412,25 +1412,8 @@ tzical examples Here is a sample file extracted from the RFC. This file defines the `EST5EDT` timezone, and will be used in the following example. - BEGIN:VTIMEZONE - TZID:US-Eastern - LAST-MODIFIED:19870101T000000Z - TZURL:http://zones.stds_r_us.net/tz/US-Eastern - BEGIN:STANDARD - DTSTART:19671029T020000 - RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 - TZOFFSETFROM:-0400 - TZOFFSETTO:-0500 - TZNAME:EST - END:STANDARD - BEGIN:DAYLIGHT - DTSTART:19870405T020000 - RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 - TZOFFSETFROM:-0500 - TZOFFSETTO:-0400 - TZNAME:EDT - END:DAYLIGHT - END:VTIMEZONE +.. include:: samples/EST5EDT.ics + :literal: And here is an example exploring a `tzical` type: @@ -1438,7 +1421,7 @@ And here is an example exploring a `tzical` type: >>> from dateutil.tz import *; from datetime import * - >>> tz = tzical('EST5EDT.ics') + >>> tz = tzical('samples/EST5EDT.ics') >>> tz.keys() ['US-Eastern'] diff --git a/docs/samples/EST5EDT.ics b/docs/samples/EST5EDT.ics new file mode 100644 index 0000000..c066ecb --- /dev/null +++ b/docs/samples/EST5EDT.ics @@ -0,0 +1,19 @@ +BEGIN:VTIMEZONE +TZID:US-Eastern +LAST-MODIFIED:19870101T000000Z +TZURL:http://zones.stds_r_us.net/tz/US-Eastern +BEGIN:STANDARD +DTSTART:19671029T020000 +RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 +TZOFFSETFROM:-0400 +TZOFFSETTO:-0500 +TZNAME:EST +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:19870405T020000 +RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 +TZOFFSETFROM:-0500 +TZOFFSETTO:-0400 +TZNAME:EDT +END:DAYLIGHT +END:VTIMEZONE |