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

Function _target_date_from_body

deployments/desktop/server.py:105–112  ·  view source on GitHub ↗
(body: Dict[str, Any])

Source from the content-addressed store, hash-verified

103 return max(1, int(value))
104
105
106def _target_date_from_body(body: Dict[str, Any]) -> str:
107 raw = str(body.get("target_date") or "").strip()
108 if not raw:
109 return datetime.now().date().isoformat()
110 try:
111 return datetime.strptime(raw, "%Y-%m-%d").date().isoformat()
112 except ValueError:
113 return datetime.now().date().isoformat()
114
115

Callers 2

_api_dailyFunction · 0.85
_api_daily_startFunction · 0.85

Calls 2

getMethod · 0.80
nowMethod · 0.80

Tested by

no test coverage detected