parse_date
Parses ambiguous human-written dates into ISO 8601 (YYYY-MM-DD) using locale-aware day-first (en-GB) or month-first (en-US) logic, and validates date existence.
Instructions
USE THIS to interpret a human-written date into ISO 8601 (YYYY-MM-DD), especially ambiguous numeric dates like 03/04/2025 which mean different things in the UK (day-first) vs US (month-first). Pass locale 'en-GB' or 'en-US'. Returns valid:false for impossible dates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The date text to parse. | |
| locale | No | 'en-GB' (day-first) or 'en-US' (month-first); default en-GB. |