Make ticks on occurrences of each day of the month. For example, 1, 15, 30.
| 1553 | |
| 1554 | |
| 1555 | class DayLocator(RRuleLocator): |
| 1556 | """ |
| 1557 | Make ticks on occurrences of each day of the month. For example, |
| 1558 | 1, 15, 30. |
| 1559 | """ |
| 1560 | def __init__(self, bymonthday=None, interval=1, tz=None): |
| 1561 | """ |
| 1562 | Parameters |
| 1563 | ---------- |
| 1564 | bymonthday : int or list of int, default: all days |
| 1565 | Ticks will be placed on every day in *bymonthday*. Default is |
| 1566 | ``bymonthday=range(1, 32)``, i.e., every day of the month. |
| 1567 | interval : int, default: 1 |
| 1568 | The interval between each iteration. For example, if |
| 1569 | ``interval=2``, mark every second occurrence. |
| 1570 | tz : str or `~datetime.tzinfo`, default: :rc:`timezone` |
| 1571 | Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. |
| 1572 | """ |
| 1573 | if interval != int(interval) or interval < 1: |
| 1574 | raise ValueError("interval must be an integer greater than 0") |
| 1575 | if bymonthday is None: |
| 1576 | bymonthday = range(1, 32) |
| 1577 | |
| 1578 | rule = rrulewrapper(DAILY, bymonthday=bymonthday, |
| 1579 | interval=interval, **self.hms0d) |
| 1580 | super().__init__(rule, tz=tz) |
| 1581 | |
| 1582 | |
| 1583 | class HourLocator(RRuleLocator): |
no outgoing calls
no test coverage detected
searching dependent graphs…