Fiscal year, quarter and period for a date: month-aligned or 52/53-week (4-4-5, 4-5-4, 5-4-4) calendars

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/fiscal-period · Id fiscal-period

Maps up to 100 dates to a fiscal year, quarter, period and week for a caller-defined fiscal calendar: a month-aligned year (starts on day 1 of a named month) or a 52/53-week year ending on a given weekday last in or closest to a month end, in a 4-4-5, 4-5-4 or 5-4-4 pattern with the 53rd week appended to the final period; detects 53-week years and checks an asserted fiscal year, quarter or period. You must state how fiscal years are labelled (by the calendar year they start or end in). It carries no company's calendar and does not know which convention a company uses; Retail and corporate calendars differ in those parameters.

What you get

FY labelling and 53-week years are the commonest cause of year-over-year period misalignment.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/fiscal-period. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/fiscal-period \
  -H 'content-type: application/json' \
  -d '{"type":"month-aligned","yearLabel":"end","startMonth":10,"items":[{"date":"2026-10-01","claimedFiscalYear":2027},{"date":"2026-09-30"}]}'

Input

FieldTypeRequiredDescription
typestring; one of "month-aligned", "52-53-week"yes
yearLabelstring; one of "start", "end"yesstart: the fiscal year is named for the calendar year it begins in. end: for the calendar year it ends in (US federal FY2027 begins 2026-10-01).
startMonthinteger; 1..12nomonth-aligned: month in which the fiscal year starts, on day 1.
endWeekdayinteger; 0..6no52-53-week: weekday the year ends on, 0=Sunday.
endMonthinteger; 1..12no52-53-week: month near whose end the year ends.
endRulestring; one of "last", "closest"no52-53-week: last endWeekday in endMonth, or the endWeekday closest to endMonth's last day.
patternstring; one of "4-4-5", "4-5-4", "5-4-4"no52-53-week: weeks per period within each quarter.
itemsarray<object>; max 100 itemsyes

Example request body

{
  "type": "month-aligned",
  "yearLabel": "end",
  "startMonth": 10,
  "items": [
    {
      "date": "2026-10-01",
      "claimedFiscalYear": 2027
    },
    {
      "date": "2026-09-30"
    }
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
itemsarray<object>no
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the calendar-deadline-kit package.

Machine-readable