{"slug":"date-math-datemath-workers-dev-v1-stay-40640a","title":"Date Math","host":"date-math.datemath.workers.dev","method":"POST","resource":"https://date-math.datemath.workers.dev/v1/stay","category":"other","description":"Date Math: Rolling stay-limit math such as the Schengen 90/180 rule: days used in the window, days left, overstay check, the longest stay allowed from a planned entry date, and the next date a full stay is possible. Entry and exit days both count. Custom rules via max_days/window_days. Use for trave","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":32,"reported_calls_30d":2,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"date":"2026-10-01","entry":"2026-11-01","trips":[{"entry":"2026-06-01","exit":"2026-07-15"},{"entry":"2026-09-10","exit":"2026-09-30"}]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"date":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"entry":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"max_days":{"default":90,"maximum":365,"minimum":1,"type":"integer"},"trips":{"description":"Past and planned stays. Entry and exit days both count as days present.","items":{"properties":{"entry":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"exit":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["entry","exit"],"type":"object"},"maxItems":200,"type":"array"},"window_days":{"default":180,"description":"Length of the rolling window, counted back from each day (inclusive)","maximum":730,"minimum":1,"type":"integer"}},"required":["trips"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"date":{"type":"string"},"days_remaining":{"type":"integer"},"days_used":{"description":"Days present in the window ending on date","type":"integer"},"first_overstay":{"description":"First day any trip broke the rule, or null","type":["string","null"]},"in_compliance":{"type":"boolean"},"max_stay":{"description":"Present when entry was given","properties":{"days_allowed":{"type":"integer"},"entry":{"type":"string"},"latest_exit":{"type":["string","null"]}},"required":["entry","days_allowed","latest_exit"],"type":["object","null"]},"next_full_stay_date":{"description":"Earliest date after date from which a full max_days stay is allowed","type":["string","null"]},"note":{"type":"string"},"overstay_days":{"type":"integer"},"rule":{"properties":{"max_days":{"type":"integer"},"window_days":{"type":"integer"},"window_end":{"type":"string"},"window_start":{"type":"string"}},"required":["max_days","window_days","window_start","window_end"],"type":"object"}},"required":["date","rule","days_used","days_remaining","overstay_days","in_compliance","first_overstay","max_stay","next_full_stay_date","note"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":28,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":36,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":34,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":26,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":38,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":31,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":32,"error":null},{"day":"2026-11-19","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1295,"error":null},{"day":"2026-11-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":34,"error":null},{"day":"2026-11-17","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":32,"error":null},{"day":"2026-11-16","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":30,"error":null},{"day":"2026-11-15","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":25,"error":null},{"day":"2026-11-14","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":29,"error":null},{"day":"2026-11-13","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":56,"error":null},{"day":"2026-11-12","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":31,"error":null},{"day":"2026-11-11","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":28,"error":null},{"day":"2026-11-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":17,"error":null},{"day":"2026-11-09","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1459,"error":null},{"day":"2026-11-08","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":30,"error":null}],"description_full":"Date Math: Rolling stay-limit math such as the Schengen 90/180 rule: days used in the window, days left, overstay check, the longest stay allowed from a planned entry date, and the next date a full stay is possible. Entry and exit days both count. Custom rules via max_days/window_days. Use for travel planning, visa-free stays and \"can I enter on\".","last_updated":"2026-11-09T11:11:29.408Z","schemes":["exact"]}