Skip to content

Commit

Permalink
Merge pull request #714 from pganssle/restructure-tz-docs
Browse files Browse the repository at this point in the history
Restructure tz docs
  • Loading branch information
pganssle committed May 8, 2018
2 parents 4bc9095 + 04af235 commit 3c7c810
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 7 deletions.
1 change: 1 addition & 0 deletions changelog.d/714.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reorganized ``dateutil.tz`` documentation and fixed issue with the ``dateutil.tz`` docstring. (gh pr #714)
2 changes: 2 additions & 0 deletions dateutil/tz/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
from .tz import *
from .tz import __doc__

#: Convenience constant providing a :class:`tzutc()` instance
#:
Expand Down
8 changes: 4 additions & 4 deletions dateutil/tz/tz.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
"""
This module offers timezone implementations subclassing the abstract
:py:`datetime.tzinfo` type. There are classes to handle tzfile format files
(usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`, etc), TZ
environment string (in all known formats), given ranges (with help from
relative deltas), local machine timezone, fixed offset timezone, and UTC
:py:class:`datetime.tzinfo` type. There are classes to handle tzfile format
files (usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`,
etc), TZ environment string (in all known formats), given ranges (with help
from relative deltas), local machine timezone, fixed offset timezone, and UTC
timezone.
"""
import datetime
Expand Down
42 changes: 39 additions & 3 deletions docs/tz.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
==
tz
==
.. autofunction:: dateutil.tz.gettz
.. py:currentmodule:: dateutil.tz
.. automodule:: dateutil.tz
:members:
:undoc-members:

Objects
-------
.. py:data:: dateutil.tz.UTC
A convenience instance of :class:`dateutil.tz.tzutc`.

Functions
---------

.. autofunction:: gettz

.. automethod:: gettz.nocache
.. automethod:: gettz.cache_clear

.. autofunction:: enfold

.. autofunction:: datetime_ambiguous
.. autofunction:: datetime_exists

.. autofunction:: resolve_imaginary


Classes
-------

.. autoclass:: tzutc

.. autoclass:: tzoffset

.. autoclass:: tzlocal

.. autoclass:: tzrange

.. autoclass:: tzstr

.. autoclass:: tzical
:members:

0 comments on commit 3c7c810

Please sign in to comment.