Fiscal year, quarter and period for a date: month-aligned or 52/53-week (4-4-5, 4-5-4, 5-4-4) calendars
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
| Field | Type | Required | Description |
|---|---|---|---|
type | string; one of "month-aligned", "52-53-week" | yes | |
yearLabel | string; one of "start", "end" | yes | start: 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). |
startMonth | integer; 1..12 | no | month-aligned: month in which the fiscal year starts, on day 1. |
endWeekday | integer; 0..6 | no | 52-53-week: weekday the year ends on, 0=Sunday. |
endMonth | integer; 1..12 | no | 52-53-week: month near whose end the year ends. |
endRule | string; one of "last", "closest" | no | 52-53-week: last endWeekday in endMonth, or the endWeekday closest to endMonth's last day. |
pattern | string; one of "4-4-5", "4-5-4", "5-4-4" | no | 52-53-week: weeks per period within each quarter. |
items | array<object>; max 100 items | yes |
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.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: 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. |
items | array<object> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always 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
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent