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

Function parse_date

experiments/human_eval/build_drift_human_eval_packet.py:39–46  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

37
38
39def parse_date(value: Any) -> datetime:
40 text = str(value or "")
41 for fmt in ("%Y-%m-%d", "%Y%m%d"):
42 try:
43 return datetime.strptime(text, fmt)
44 except ValueError:
45 continue
46 raise ValueError(f"Invalid date: {value}")
47
48
49def iso_date(value: datetime) -> str:

Callers 1

collect_candidatesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected