{"uid":"cap_zJ5Al9LcC2wOxv0olrtcR","slug":"date-math-calendar-info-for-a-date-8bd19285","name":"Date Math – Calendar Info for a Date","description":"Date Math: Calendar facts for a date: day of the week, ISO week number, quarter, day of year, leap year, weekend. Use for \"what day is\", week numbers and fiscal quarters.","url":"https://date-math.datemath.workers.dev/v1/info?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"date":{"type":"string","example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"responseSchema":{"type":"json","example":{"date":"2026-11-07","quarter":4,"weekday":"Saturday","iso_week":45,"iso_year":2026,"is_weekend":true,"day_of_year":311,"days_in_year":365,"is_leap_year":false,"unix_seconds":1794009600,"days_in_month":30,"weekday_number":6,"days_remaining_in_year":54}},"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_TcItGeFGCUMsd_YioqI40","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":"Returns calendar facts for a given date: weekday name, ISO week/year, quarter, day-of-year, leap year status, weekend flag, days remaining, and Unix timestamp.","exampleAgentPrompt":"What day of the week is November 7, 2026, what quarter does it fall in, and is it a weekend? Also tell me the ISO week number and how many days are left in the year.","exampleUseCases":[{"title":"Scheduling report deadlines by quarter","prompt":"My report is due on March 31, 2025 — can you tell me what quarter that falls in, what ISO week number it is, and whether it lands on a weekend so I can plan accordingly?"},{"title":"Leap year check for anniversary planning","prompt":"Is 2028 a leap year? I need to know if February 29th, 2028 is a real date and what day of the week it falls on."},{"title":"Day-of-year progress tracking","prompt":"How far through the year are we on July 4, 2025? Tell me the day number, how many days are left, and what weekday it is."}],"resultDescription":"A JSON object with the input date plus: weekday name and number, ISO week number and ISO year, calendar quarter (1–4), day of year, days remaining in year, days in year, days in month, is_weekend boolean, is_leap_year boolean, and Unix timestamp in seconds.","failureModes":["Invalid date format (not YYYY-MM-DD) returns a 400 or error response","Out-of-range dates (e.g. month 13) return an error","Missing 'date' field in request body returns an error","Non-existent dates like February 30 return an error"],"whenToPreferThis":"Use this endpoint when you need rich calendar metadata about a single date — weekday, ISO week, quarter, leap year, weekend status, and Unix timestamp — all in one call, rather than computing each separately. Prefer it over general-purpose date libraries when you need a lightweight, pay-per-call API with no setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:36:16.891Z","isFirstParty":false,"canonicalSlug":"date-math-calendar-info-for-a-date-8bd19285"}