(body: Dict[str, Any])
| 103 | return max(1, int(value)) |
| 104 | |
| 105 | |
| 106 | def _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 |
no test coverage detected