{"slug":"date-math-datemath-workers-dev-v1-pay-dates-93704a","title":"Date Math","host":"date-math.datemath.workers.dev","method":"POST","resource":"https://date-math.datemath.workers.dev/v1/pay_dates","category":"other","description":"Date Math: Upcoming pay or billing dates for monthly, semi-monthly (e.g. 15th and last day), biweekly or weekly schedules, moved off weekends and public holidays (to the previous, next or nearest business day). Use for payroll calendars, invoice due dates and recurring billing.","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":29,"reported_calls_30d":2,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"count":4,"country":"PH","from":"2026-12-01","schedule":"semi_monthly"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"adjust":{"default":"previous","description":"Where to move a pay date that falls on a weekend or holiday","enum":["previous","next","nearest","none"],"type":"string"},"anchor":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"count":{"default":6,"description":"How many pay dates to return","maximum":24,"minimum":1,"type":"integer"},"country":{"description":"ISO 3166-1 alpha-2 country code (207 countries); its public holidays (2000–2050) are excluded from business days","example":"US","pattern":"^[A-Za-z]{2}$","type":"string"},"days":{"description":"monthly: 1 day, semi_monthly: 2 days of the month (1–31 or \"last\"; 31 clamps to month end). Defaults: [\"last\"] and [15, \"last\"]","items":{"oneOf":[{"maximum":31,"minimum":1,"type":"integer"},{"enum":["last"],"type":"string"}]},"maxItems":2,"minItems":1,"type":"array"},"from":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"holidays":{"description":"Extra dates excluded from business-day counts (rest days from workdays are always excluded)","items":{"example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"maxItems":1000,"type":"array"},"schedule":{"enum":["monthly","semi_monthly","biweekly","weekly"],"type":"string"},"workdays":{"description":"Working days of the week, 0 = Sunday. Default [1,2,3,4,5] (Mon–Fri); e.g. [0,1,2,3,4] for Sun–Thu or [1,2,3,4,5,6] for Mon–Sat","example":[1,2,3,4,5],"items":{"maximum":6,"minimum":0,"type":"integer"},"maxItems":7,"minItems":1,"type":"array"}},"required":["schedule","from"],"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":{"adjust":{"type":"string"},"count":{"type":"integer"},"pay_dates":{"items":{"properties":{"adjusted":{"type":"boolean"},"is_business_day":{"description":"Only with adjust none","type":"boolean"},"pay_date":{"description":"The actual business day to pay","type":"string"},"reason":{"description":"weekend, or holiday: <name>","type":"string"},"scheduled":{"description":"The nominal date (e.g. the 15th)","type":"string"},"weekday":{"type":"string"}},"required":["scheduled","pay_date","weekday","adjusted"],"type":"object"},"type":"array"},"schedule":{"type":"string"}},"required":["schedule","adjust","count","pay_dates"],"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":18,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":48,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":27,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1264,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":29,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":25,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":40,"error":null},{"day":"2026-11-19","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":27,"error":null},{"day":"2026-11-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":29,"error":null},{"day":"2026-11-17","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":33,"error":null},{"day":"2026-11-16","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":32,"error":null},{"day":"2026-11-15","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":28,"error":null},{"day":"2026-11-14","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":30,"error":null},{"day":"2026-11-13","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":45,"error":null},{"day":"2026-11-12","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":30,"error":null},{"day":"2026-11-11","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":40,"error":null},{"day":"2026-11-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":36,"error":null},{"day":"2026-11-09","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":20,"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},{"day":"2026-11-07","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":1468,"error":null}],"description_full":"Date Math: Upcoming pay or billing dates for monthly, semi-monthly (e.g. 15th and last day), biweekly or weekly schedules, moved off weekends and public holidays (to the previous, next or nearest business day). Use for payroll calendars, invoice due dates and recurring billing.","last_updated":"2026-11-09T11:11:27.909Z","schemes":["exact"]}