| 814 | def _get_date_min_max(self, dmin=None, dmax=None): |
| 815 | """Retrieve and parse 'date-min' and 'date-max' config values""" |
| 816 | def get(key, default): |
| 817 | ts = self.config(key, default) |
| 818 | if isinstance(ts, str): |
| 819 | dt_obj = dt.parse_iso(ts) |
| 820 | if dt_obj is dt.NONE: |
| 821 | self.log.warning("Unable to parse '%s': Invalid ISO 8601 " |
| 822 | "date/time value '%s'", key, ts) |
| 823 | ts = default |
| 824 | else: |
| 825 | ts = int(dt.to_ts(dt_obj)) |
| 826 | return ts |
| 827 | if self.config("date-format"): |
| 828 | self.log.error("'date-format' is no longer supported. " |
| 829 | "Use ISO 8601 date/time values instead.") |