{"uid":"cap_x7y-gwdi4opUrc4qtqF1W","slug":"writerslogic-week-number-calculator-b0edba77","name":"WritersLogic Week Number Calculator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/week-number?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","required":["date"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10},"claimedWeek":{"type":"integer","maximum":54,"minimum":1},"claimedWeekYear":{"type":"integer","maximum":3000,"minimum":1000}}},"maxItems":200,"minItems":1},"system":{"enum":["iso","us","custom"],"type":"string","description":"iso: weekStart Monday, minimalDays 4. us: weekStart Sunday, minimalDays 1. custom: give weekStart and minimalDays."},"weekStart":{"type":"integer","maximum":6,"minimum":0,"description":"0=Sunday..6=Saturday (custom)."},"minimalDays":{"type":"integer","maximum":7,"minimum":1,"description":"Days of the new year the first week must contain (custom)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kpaRhwXMxmyLXAdd24YhB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes ISO 8601, US-convention, or custom week numbers, week-years, week counts, and week boundary dates for up to 200 dates, optionally verifying asserted week/week-year values.","exampleAgentPrompt":"What ISO 8601 week number and week-year does 2027-01-01 fall into, and what are the first and last days of that week? Also check whether my claim that it's in week 1 of 2027 is correct.","exampleUseCases":[{"title":"Verify week labels in generated report","prompt":"I have a financial report with week-based row labels — can you check whether these dates are correctly labeled as ISO week numbers: 2026-12-28 as W53-2026, 2027-01-01 as W53-2026, and 2027-01-04 as W01-2027?"},{"title":"Build weekly schedule file names","prompt":"I need ISO week numbers and the Monday and Sunday boundaries for each of these dates so I can name my weekly files correctly: 2024-01-01, 2024-03-15, 2024-07-04, and 2024-12-30."},{"title":"Convert US-convention week numbers for payroll","prompt":"For our US payroll system that uses Sunday-start weeks where week 1 always contains January 1st, what week number and boundaries do these dates fall into: 2025-01-01, 2025-01-05, 2025-12-28, and 2025-12-31?"}],"resultDescription":"For each input date, returns the week number, week-year, total number of weeks in that week-year, and the ISO-formatted first and last day of the week. If claimedWeek or claimedWeekYear were supplied, also returns a boolean indicating whether the assertion is correct.","failureModes":["Date string does not match YYYY-MM-DD pattern — validation error returned","More than 200 items submitted — request rejected with max-items error","system=custom provided without weekStart or minimalDays — error indicating missing custom parameters","claimedWeek value outside 1–54 range — schema validation failure","Network or payment failure returns HTTP 402 or 5xx with no week data"],"whenToPreferThis":"Use this endpoint when an agent needs to compute, convert, or verify week numbers across ISO 8601 and US conventions, especially in bulk (up to 200 dates) or when validating existing week labels in reports, schedules, or file names. Prefer it over manual date math when cross-convention accuracy matters or when the week-year boundary (e.g. Jan 1 falling in the prior year's last week) is critical. For fiscal-year week calendars, use a fiscal-period endpoint instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T23:54:30.602Z","isFirstParty":false,"canonicalSlug":"writerslogic-week-number-calculator-b0edba77"}