Repository navigation
ADR 0034 special periods
A subdivision can add up to four zero-length special periods after its last period. They are numbered after the regular periods, start and end on the fiscal year's end_exclusive, never contain a date, and appear wherever an operation lists or names periods, but never in locate, shift or dimension.
Last reviewed: 21 Nov 2026
Accepted on 21 Nov 2026 by the maintainer, proposed in issue #83. Planned for 0.3 (ADR-0031). Not built. The implementation is issue #89. The discussion is on issue #83, because the Design decisions category of Discussions does not exist yet.
FR-009 on the PDR asks for "Zero-length special periods attached to the last period (SAP periods 13–16); never returned by locate." SAP's documentation says: "Special periods are used to subdivide the last posting period for closing operations." (SAP Learning, verified on the Analysis page). The "13–16" range is the PDR's. It has not been checked against SAP's own documentation, so the limit of four below is unverified.
Accounting systems post closing entries to these periods, so a definition used to label ledger data needs them to exist as periods. They cover no days: every date already belongs to a regular period. ADR-0007 allows an interval with start == end_exclusive.
- Labels and coordinates for special periods, so ledger data can be joined to them.
- No change to any operation's result for a definition without special periods.
- No silent choice where an operation has no clear answer (design rule 8).
Pros:
- They get coordinates
(period, year, index), labels from the existing{pp}placeholder, and a parent quarter, with no new level.
Cons:
- Operations that walk periods in order must say what they do with an empty one.
Pros:
- Operations on the
periodlevel stay unchanged.
Cons:
- A new level for every operation, template and binding, and the ledger's period numbers 13 to 16 would no longer be period indexes.
Pros:
- Nothing to build.
Cons:
- FR-009 stays unmet, and every user rebuilds the same numbering.
Option 1.
subdivision.special_periods is an integer from 1 to 4. It is allowed with calendar_months, week_pattern and anchored, at the top level and in a history entry. In a transition, and in a table subdivision, it is UNSUPPORTED_COMBINATION. Omitting it means none; that is not an organisation-specific choice, because a calendar without special periods has none.
With n regular periods in a fiscal year and s special periods:
- Special period j (1 ≤ j ≤ s) is the period with index n + j. Its
startandend_exclusiveare both the fiscal year'send_exclusive. - Its parent is the quarter that holds period n.
- It is never returned by
locateorexplain, because it contains no date, and it adds no rows todimension. -
period("period", year, n + j)returns it.childrenof the year or of the last quarter at theperiodlevel lists it after period n. -
formatnames it with the scheme'speriodtemplate, soP{pp}givesP13toP16in a twelve-period year.parsefinds it the same way. -
shiftcounts regular periods only: shifting period n by 1 gives period 1 of the next fiscal year. Shifting a special period isINVALID_ARGUMENTatperiod, with a hint, because "one period after period 13" has more than one reasonable answer.
Good:
- SAP-style period numbers 13 to 16 exist and have labels, with no new level, placeholder or error code.
- Definitions without
special_periodsare unchanged.
Bad:
-
childrenandperiodcan return empty intervals, which a caller that divides by a period's length must handle. - The limit of four comes from the PDR, not from a verified SAP source.
What 0.3 must implement (issue #89): the shape and meaning above in both spec files, the widened description of INVALID_ARGUMENT, and vectors for every operation listed.
fiscalclock is licensed under MIT OR Apache-2.0 (MIT, Apache-2.0). Last reviewed: 31 Oct 2026. Found an error on this page? Report it with the documentation form.