module documentation
Undocumented
Class | tzrangebase |
This is an abstract base class for time zones represented by an annual transition into and out of DST. Child classes should implement the following methods: |
Function | enfold |
Provides a unified interface for assigning the ``fold`` attribute to datetimes both before and after the implementation of PEP-495. |
Function | tzname |
Change unicode output into bytestrings in Python 2 |
Constant | ZERO |
Undocumented |
Class | _tzinfo |
Base class for all ``dateutil`` ``tzinfo`` objects. |
Function | _validate |
The CPython version of ``fromutc`` checks that the input is a ``datetime`` object and that ``self`` is attached as its ``tzinfo``. |
Provides a unified interface for assigning the ``fold`` attribute to datetimes both before and after the implementation of PEP-495. :param fold: The value for the ``fold`` attribute in the returned datetime. This should be either 0 or 1. :return: Returns an object for which ``getattr(dt, 'fold', 0)`` returns ``fold`` for all versions of Python. In versions prior to Python 3.6, this is a ``_DatetimeWithFold`` object, which is a subclass of :py:class:`datetime.datetime` with the ``fold`` attribute added, if ``fold`` is 1. .. versionadded:: 2.6.0
Change unicode output into bytestrings in Python 2 tzname() API changed in Python 3. It used to return bytes, but was changed to unicode strings