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

Function _parse_date

skills/openreview-fetcher/scripts/fetch_openreview.py:567–578  ·  view source on GitHub ↗

Parse YYYYMMDD / YYYY-MM-DD strings into date objects.

(value: str)

Source from the content-addressed store, hash-verified

565
566
567def _parse_date(value: str) -> Optional[date]:
568 """Parse YYYYMMDD / YYYY-MM-DD strings into date objects."""
569 normalized = (value or "").strip()
570 if not normalized:
571 return None
572
573 for fmt in ("%Y%m%d", "%Y-%m-%d"):
574 try:
575 return datetime.strptime(normalized, fmt).date()
576 except ValueError:
577 continue
578 return None
579
580
581def _infer_years_from_range(start_date: str, end_date: str) -> List[int]:

Callers 2

_infer_years_from_rangeFunction · 0.70
fetch_by_dateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected