{"uid":"cap_bOBNnVtl0CEnf-YYPd398","slug":"agishub-date-calculate-25103159","name":"AGISHub Date Calculate","description":"Timezone-aware date arithmetic: add or subtract a duration to a datetime (days are calendar-based and DST-safe; hours and minutes are absolute), or compute the difference between two datetimes that may be in different zones.","url":"https://api.agishub.com/v1/date-calculate","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"enum":["http"],"type":"string"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["datetime","timezone","operation"],"properties":{"datetime":{"type":"string","description":"Base datetime: ISO 8601 or natural language."},"timezone":{"type":"string","description":"IANA timezone the base datetime is in."},"operation":{"type":"object","required":["type"],"properties":{"type":{"enum":["add","diff"],"type":"string","description":"'add' to shift the datetime by a duration, or 'diff' to measure the gap between two datetimes."},"unit":{"enum":["seconds","minutes","hours","days","weeks"],"type":"string","description":"For type 'add': one of seconds, minutes, hours, days, weeks."},"amount":{"type":"number","description":"For type 'add': how much to shift. Use a negative number to subtract."},"to_datetime":{"type":"string","description":"For type 'diff': the second datetime (ISO 8601 or natural language)."},"to_timezone":{"type":"string","description":"For type 'diff': the IANA timezone of to_datetime (defaults to the base timezone)."}},"description":"What to compute: { type:'add', amount, unit } to add/subtract a duration, or { type:'diff', to_datetime, to_timezone? } for the difference between two datetimes.","additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"enum":["json"],"type":"string"},"example":{"type":"object"}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"result":"Timezone-aware date arithmetic: add or subtract a duration to a datetime (days are calendar-based and DST-safe; hours an"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AulnfIPKjudOmWIufIdiY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs timezone-aware date arithmetic: add or subtract a duration from a datetime, or compute the difference between two datetimes across different timezones with DST-safe calendar-day handling.","exampleAgentPrompt":"What date and time will it be exactly 90 calendar days after March 15, 2025 at 9:00am in America/New_York? I need the result accounting for daylight saving time.","exampleUseCases":[{"title":"Contract deadline calculation","prompt":"I signed a contract on January 10, 2025 in America/Chicago time. What is the exact date 180 calendar days later, accounting for daylight saving time?"},{"title":"Cross-timezone meeting gap check","prompt":"How many hours are there between a meeting starting on March 28, 2025 at 10:00am in Europe/London and another event on March 29, 2025 at 8:00am in Asia/Tokyo?"},{"title":"Subscription renewal countdown","prompt":"My subscription started on November 1, 2024 at midnight in Australia/Sydney. What date is exactly 1 year later, accounting for any DST changes?"}],"resultDescription":"A JSON object containing the computed result: for 'add' operations, the resulting datetime string in the specified timezone; for 'diff' operations, the numeric difference between the two datetimes in the relevant unit, both adjusted for DST and cross-timezone offsets.","failureModes":["Invalid or unrecognized IANA timezone identifier returns an error","Malformed or ambiguous datetime string that cannot be parsed fails with a parsing error","Missing required 'operation' fields (e.g. amount/unit for 'add', to_datetime for 'diff') return a validation error","Providing an out-of-range amount (extremely large durations) may produce unexpected results","Network or service unavailability returns a non-200 HTTP error"],"whenToPreferThis":"Choose this endpoint when you need precise, DST-aware calendar arithmetic — especially when crossing daylight saving boundaries or computing differences between datetimes in different IANA timezones. It distinguishes between calendar-based days (which respect DST) and absolute hours/minutes, making it more reliable than naive date math. Prefer it over general-purpose LLMs for date arithmetic to avoid hallucination errors in timezone-sensitive calculations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:52:38.576Z","isFirstParty":false}