MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _parse_feed_date

Function _parse_feed_date

deployments/feishu/daily-push-agent/main.py:120–132  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

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

Callers 1

fetch_one_feedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected