{"uid":"cap_INqBkSbZmM7jBSCxioOQk","slug":"2s-business-days-calculator-6ecf96c6","name":"2s Business Days Calculator","description":"Holiday-aware business-day calculator for 200+ countries. Three modes: pass start + addDays (signed integer) to shift a date by N business days; pass start + end to count business days between two dates (exclusive of start, inclusive of end); pass start alone to check one date (is it a business day, which holiday, next/previous business day). Query: country (ISO 3166-1 alpha-2), start (YYYY-MM-DD), optional region (subdivision code), addDays XOR end, optional weekend (comma-separated days, default sat,sun — e.g. fri,sat for the Gulf), optional types (holiday types treated as closures, default public,bank). Skipped holidays are itemized in the response. Use for payment terms, SLA deadlines, and delivery-date math.","url":"https://2s.io/api/calendar/business-days?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"required":["country","start"],"properties":{"end":{"type":"string","description":"End date YYYY-MM-DD to count business days to (XOR with addDays)."},"start":{"type":"string","description":"Anchor date, YYYY-MM-DD."},"types":{"type":"string","description":"Optional holiday types treated as closures. Default public,bank."},"region":{"type":"string","description":"Optional subdivision code, e.g. CA, BY."},"addDays":{"type":"string","description":"Signed business days to add (XOR with end)."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code."},"weekend":{"type":"string","description":"Optional weekend days, comma-separated. Default sat,sun."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"end":"2026-08-15","start":"2026-07-02","country":"US"}}},"response":{"data":{"ok":true,"items":[{"end":"2026-08-15","mode":"between","start":"2026-07-02","region":null,"country":"US","businessDays":30,"calendarDays":44,"holidaysInRange":[{"date":"2026-07-03","name":"Independence Day (substitute day)"}]}],"total":1,"source":{"url":"https://github.com/commenthol/date-holidays","license":"ISC (code) + CC BY 3.0 (holiday data)","provider":"date-holidays rule set (computed locally by 2s.io)"}},"meta":{"cost":{"usd":0.001,"tier":0},"caller":"x402","version":null,"endpoint":"calendar.business-days","settlement":{"txHash":"0xc9e334cdb05d2f2c072c9621b4b0b2867e7d804bd548ecb8da63a85ee648b755","network":"eip155:8453","success":true}}}},"exampleRequest":{"end":"2026-08-15","start":"2026-07-02","country":"US"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dIxTTWo8LU44uJV3eRLaO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates business days between two dates or adds/subtracts business days from an anchor date, accounting for public holidays and weekends by country and region.","exampleAgentPrompt":"How many business days are there between July 2 and August 15, 2026 in the US, and which holidays get skipped?","exampleUseCases":null,"resultDescription":"Returns a JSON object with ok:true, an items array containing for each query: the mode (add or count), start date, result date or business-day count, country, region, list of holidays skipped (each with date and name), and calendar days spanned. Also includes a source object with provider name, license, and URL.","failureModes":["Missing required 'country' or 'start' parameter returns an error","Invalid ISO date format causes a parse error","Providing both 'end' and 'addDays' simultaneously (XOR violation) returns an error","Unsupported country code returns empty or error","Invalid region/subdivision code may return results without regional holidays"],"whenToPreferThis":"Use this endpoint when you need accurate business-day calculations that respect country-specific public holidays and configurable weekends, especially for scheduling contract deadlines, payment settlement windows, delivery estimates, or legal notice periods. Prefer this over a generic date-math library when holiday awareness by country and optional subdivision is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:42:59.017Z","isFirstParty":false,"canonicalSlug":"2s-business-days-calculator-6ecf96c6"}