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

118
119
120def _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
135def _parse_iso_date(value: Any) -> Optional[date]:

Callers 1

fetch_one_feedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected