Resolve a calendar date
Deterministic Gregorian date arithmetic shared with the resolve_date built-in. Supply an IANA timezone. Empty date arguments return today in that zone at execution time. One anchor: date, day_of_month (optionally month/year), weekday, or today. weekday alongside a date checks the claim before offsets. next/previous weekdays exclude the reference day; on_or_after/on_or_before include it. Missing day/month/year components use the next (or past) valid occurrence including the reference date. Resolve anchor, add calendar months (clamping month-end), then add weeks and days. No booking or business-policy decisions. Clarify ambiguous dates before submitting. reference_date changes the arithmetic anchor; days_from_today still compares with local today.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
Idempotency-Key?stringOptional. When supplied, identical retries replay the saved result. Retries and idempotency.
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$1 <= length <= 255application/json- body
timezone*stringIANA timezone, e.g. Asia/Dubai or America/New_York. Required; no phone-number or server-local inference.
1 <= lengthreference_date?stringOptional arithmetic anchor, Gregorian YYYY-MM-DD. Defaults to local today.
datedate?stringExplicit valid Gregorian date. Mutually exclusive with date components.
dateday_of_month?integer1 <= value <= 31month?integerRequires day_of_month.
1 <= value <= 12year?integerRequires month and day_of_month.
1 <= value <= 9999weekday?stringAnchor weekday, or a weekday claim to validate against an explicit date.
"monday""tuesday""wednesday""thursday""friday""saturday""sunday"occurrence?stringOnly for a weekday anchor. Defaults to next, or previous when direction is past.
"next""on_or_after""previous""on_or_before""this_week""next_week""last_week"direction?stringDirection for incomplete calendar dates and bare weekdays. Does not override an explicit year/date or occurrence.
"future""future""past"days?integer-36600 <= value <= 366000weeks?integer-5200 <= value <= 52000months?integer-1200 <= value <= 12000week_starts_on?string"monday""monday""tuesday""wednesday""thursday""friday""saturday""sunday"locale?stringSpoken-date formatting only. The calendar remains Gregorian.
"en-US""en-US""ar-SA"Resolved date, or weekday_mismatch with a question. A mismatch is not a confirmed date; offsets are not applied.
application/json- response
status*string"resolved""weekday_mismatch"resolved_date*stringdateweekday*string"monday""tuesday""wednesday""thursday""friday""saturday""sunday"today*stringdatereference_date*stringdatetimezone*stringtimezone_source*string"request""organization""configuration""caller""agent"days_from_today*integeris_past*booleandate_spoken*stringadjustments*array<>expected_weekday?string"monday""tuesday""wednesday""thursday""friday""saturday""sunday"question?stringcurl -X POST 'https://api.kejue.co/v1/dates/resolve' \ -H 'Content-Type: application/json' \ -d '{ "timezone": "string"}'{ "status": "resolved", "resolved_date": "2019-08-24", "weekday": "monday", "today": "2019-08-24", "reference_date": "2019-08-24", "timezone": "string", "timezone_source": "request", "days_from_today": 0, "is_past": true, "date_spoken": "string", "adjustments": [ "month_end_clamped" ], "expected_weekday": "monday", "question": "string"}