{"uid":"cap_2DxEhb_Gji2fToYk4ZhCc","slug":"sitecheck-date-calculator-d689d1c0","name":"SiteCheck Date Calculator","description":"Date and time calculations in pure code. op=diff: calendar years, months and days between two dates, and the total days. op=add or subtract: move a date by years, months, weeks, days, hours or minutes (month ends are clamped). op=info: weekday, ISO week, day of year, quarter, and age from birthDate. op=tz: a local date-time in one IANA time zone shown in another. Impossible dates are a 400 with the reason.","url":"https://api.sitecheck-api.workers.dev/api/date/calc?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"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["op"],"properties":{"op":{"type":"string","description":"diff, add, subtract, info or tz"},"to":{"type":"string","description":"diff: end date YYYY-MM-DD"},"asOf":{"type":"string","description":"info: the date the age is counted to, default today (UTC)"},"date":{"type":"string","description":"add, subtract, info: date YYYY-MM-DD"},"from":{"type":"string","description":"diff: start date YYYY-MM-DD; tz: local date-time YYYY-MM-DDTHH:MM"},"unit":{"type":"string","description":"add, subtract: years, months, weeks, days (default), hours or minutes"},"amount":{"type":"string","description":"add, subtract: whole number"},"to_zone":{"type":"string","description":"tz: IANA zone to show, e.g. America/New_York"},"datetime":{"type":"string","description":"tz: local date-time like 2026-10-15T09:30"},"birthDate":{"type":"string","description":"info: date of birth YYYY-MM-DD, for the age"},"from_zone":{"type":"string","description":"tz: IANA zone of the given time, e.g. Europe/Berlin"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"op":"diff","to":"2026-10-15","days":16,"from":"2000-02-29","years":26,"months":7,"source":"Computed here (pure code, proleptic Gregorian calendar)","checkedAt":"2026-10-15T14:00:29.548Z","direction":"forward","totalDays":9725,"totalHours":233400,"totalWeeks":1389}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dDdwzKdwz5jJ5BqfmB7cK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs date arithmetic and timezone conversions: calculates differences between dates, adds or subtracts time units, retrieves date info including age, and converts times between IANA timezones.","exampleAgentPrompt":"How many days, weeks, and months are there between February 29, 2000 and October 15, 2026? Use the date diff operation.","exampleUseCases":[{"title":"Days until project deadline","prompt":"How many total days and weeks are left between today, April 1 2025, and my deadline of December 31 2025? I need the breakdown in years, months, and days too."},{"title":"Age calculation from birthdate","prompt":"Calculate how old someone born on March 15, 1990 is as of today — give me years, months, and days."},{"title":"Timezone meeting conversion","prompt":"Convert 9:30 AM on October 15 2026 in Berlin (Europe/Berlin) to New York time (America/New_York) so I know when to dial into the call."}],"resultDescription":"Returns a JSON object with the computed result for the requested operation: for 'diff', includes days, years, months, direction, totalDays, totalHours, totalWeeks, from, to, and checkedAt timestamp; for 'add'/'subtract', returns the resulting date; for 'info', returns age details; for 'tz', returns the converted datetime in the target timezone. All results are computed server-side using proleptic Gregorian calendar arithmetic.","failureModes":["Missing required 'op' query parameter returns an error","Invalid date format (not YYYY-MM-DD) causes a parse error","Unrecognized IANA timezone string causes a timezone conversion failure","Missing required companion parameters for the operation (e.g., 'from'/'to' for diff) returns an error","Non-integer 'amount' for add/subtract operations may fail validation"],"whenToPreferThis":"Choose this endpoint when an agent needs precise calendar arithmetic — especially date differences with multi-unit breakdowns (days, weeks, months, years), date offsets, age calculations from a birthdate, or timezone conversions — without relying on the LLM's own date math, which can be error-prone. Ideal for workflows requiring deterministic, auditable date computations at very low cost ($0.001 per call).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T12:43:11.694Z","isFirstParty":false,"canonicalSlug":"sitecheck-date-calculator-d689d1c0"}