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

Function parse_date

experiments/drift/build_drift_adaptation_experiment.py:50–59  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

48
49
50def parse_date(value: Any) -> Optional[datetime]:
51 text = str(value or "").strip()
52 if not text:
53 return None
54 for fmt in ("%Y-%m-%d", "%Y%m%d"):
55 try:
56 return datetime.strptime(text, fmt)
57 except ValueError:
58 continue
59 return None
60
61
62def iso_date(value: datetime) -> str:

Callers 4

first_trigger_by_userFunction · 0.70
read_drift_eventsFunction · 0.70
adaptation_delay_daysFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected