(value: Any)
| 118 | |
| 119 | |
| 120 | def _parse_feed_date(value: Any) -> str: |
| 121 | text = str(value or "").strip() |
| 122 | if not text: |
| 123 | return "" |
| 124 | for fmt in ("%Y-%m-%d", "%Y-%m-%dT%H:%M:%SZ", "%Y-%m-%dT%H:%M:%S%z"): |
| 125 | try: |
| 126 | return datetime.strptime(text, fmt).date().isoformat() |
| 127 | except ValueError: |
| 128 | pass |
| 129 | try: |
| 130 | return parsedate_to_datetime(text).date().isoformat() |
| 131 | except Exception: |
| 132 | return text[:10] |
| 133 | |
| 134 | |
| 135 | def _parse_iso_date(value: Any) -> Optional[date]: |