aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Dickson <prdickson@users.noreply.github.com>2018-06-08 17:23:50 +0100
committerPaul Ganssle <paul@ganssle.io>2018-06-20 10:39:42 -0400
commitbd3253395990a61f36612357b3146b679261d50b (patch)
tree8245cf03e36525d543763a28f7762cdd46b7c713
parentef6cddd64808bc1cf67d378f7c9136d9757be6ca (diff)
downloaddateutil-bd3253395990a61f36612357b3146b679261d50b.tar.gz
#623: added documentation for rrulestr function
-rw-r--r--dateutil/rrule.py25
-rw-r--r--docs/rrule.rst13
2 files changed, 37 insertions, 1 deletions
diff --git a/dateutil/rrule.py b/dateutil/rrule.py
index 7ce6a37..686251a 100644
--- a/dateutil/rrule.py
+++ b/dateutil/rrule.py
@@ -1414,6 +1414,31 @@ class rruleset(rrulebase):
class _rrulestr(object):
+ """ Parses a string representation of a recurrence rule or set of
+ recurrence rules.
+
+ :param s: Required, a string defining one or more recurrence rules.
+ :param dtstart: If given, used as the default recurrence start if not
+ specified in the rule string.
+ :param cache: If set ``True`` caching of results will be enabled, improving
+ performance of multiple queries considerably.
+ :param unfold: If set ``True`` indicates that a rule string is split over more
+ than one line and should be joined before processing.
+ :param forceset: If set ``True`` forces a :class:`dateutil.rrule.rruleset` to
+ be returned.
+ :param compatible: If set ``True`` forces ``unfold`` and ``forceset``
+ to be ``True``.
+ :param ignoretz: If set ``True``, time zones in parsed strings are ignored
+ and a naive :class:`datetime.datetime` object is returned.
+ :param tzids: If given, a callable or mapping used to retrieve a
+ :class:`datetime.tzinfo` from a string representation.
+ Defaults to :func:`dateutil.tz.gettz`.
+ :param tzinfos: Additional time zone names / aliases which may be present in a
+ string representation. See :func:`dateutil.parser.parse` for more
+ information.
+ :return: type of :class:`dateutil.rrule.rruleset` or
+ :class:`dateutil.rrule.rrule`"""
+
_freq_map = {"YEARLY": YEARLY,
"MONTHLY": MONTHLY,
"WEEKLY": WEEKLY,
diff --git a/docs/rrule.rst b/docs/rrule.rst
index 0e54fdb..3fe569e 100644
--- a/docs/rrule.rst
+++ b/docs/rrule.rst
@@ -3,9 +3,20 @@ rrule
=====
.. automodule:: dateutil.rrule
- :members:
:undoc-members:
+Classes
+-------
+
+.. autoclass:: rrule
+.. autoclass:: rruleset
+
+Functions
+---------
+
+.. autofunction:: rrulestr
+
+
rrule examples
--------------
These examples were converted from the RFC.