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

Skip to content

Commit 39bdf39

Browse files
committed
Deprecate to-days converters in matplotlib dates
1 parent b96fb6f commit 39bdf39

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
API deprecations
2+
````````````````
3+
4+
The following API elements are deprecated:
5+
6+
- ``dates.seconds()``, ``dates.minutes()``, ``dates.hours()``,
7+
``dates.weeks()``

lib/matplotlib/dates.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,27 +1728,31 @@ def date_ticker_factory(span, tz=None, numticks=5):
17281728
return locator, formatter
17291729

17301730

1731+
@cbook.deprecated("3.1")
17311732
def seconds(s):
17321733
"""
17331734
Return seconds as days.
17341735
"""
17351736
return s / SEC_PER_DAY
17361737

17371738

1739+
@cbook.deprecated("3.1")
17381740
def minutes(m):
17391741
"""
17401742
Return minutes as days.
17411743
"""
17421744
return m / MINUTES_PER_DAY
17431745

17441746

1747+
@cbook.deprecated("3.1")
17451748
def hours(h):
17461749
"""
17471750
Return hours as days.
17481751
"""
17491752
return h / HOURS_PER_DAY
17501753

17511754

1755+
@cbook.deprecated("3.1")
17521756
def weeks(w):
17531757
"""
17541758
Return weeks as days.

0 commit comments

Comments
 (0)