Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cleanup DateFormatter docstring. #14613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,21 +589,18 @@ def drange(dstart, dend, delta):

class DateFormatter(ticker.Formatter):
"""
Tick location is seconds since the epoch. Use a :func:`strftime`
format string.

Python only supports :mod:`datetime` :func:`strftime` formatting
for years greater than 1900. Thanks to Andrew Dalke, Dalke
Scientific Software who contributed the :func:`strftime` code
below to include dates earlier than this year.
Format a tick (in seconds since the epoch) with a `strftime` format string.
"""

illegal_s = re.compile(r"((^|[^%])(%%)*%s)")

def __init__(self, fmt, tz=None):
"""
*fmt* is a :func:`strftime` format string; *tz* is the
:class:`tzinfo` instance.
Parameters
----------
fmt : str
`strftime` format string
tz : `tzinfo`
"""
if tz is None:
tz = _get_rc_timezone()
Expand Down