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

Function _parse_date

agents/wiki-agent/export/monthly_report.py:87–99  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

85
86
87def _parse_date(value: Any) -> Optional[datetime]:
88 text = _clean_text(value)
89 if not text:
90 return None
91 normalized = text.replace("Z", "+00:00")
92 for candidate in (normalized, normalized[:19], normalized[:10]):
93 if not candidate:
94 continue
95 try:
96 return datetime.fromisoformat(candidate)
97 except ValueError:
98 pass
99 return None
100
101
102def _node_dates(node: Dict[str, Any]) -> List[Tuple[str, datetime]]:

Callers 1

_node_datesFunction · 0.70

Calls 1

_clean_textFunction · 0.70

Tested by

no test coverage detected