Documentation
¶
Overview ¶
Package reportingcycle holds the ReportingCycle kind's rules and the one derivation every reader of a cycle must agree on: which periods it has. Periods are derived, never stored (TAXONOMY.md D8); named periods (TAXONOMY.md D40) are listed by the month each ends, so readings, filed by the month their period ends, need no change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ends ¶
Ends reports whether month (YYYY-MM) is the end of one of the cycle's named periods. A regular cycle answers true for every month: its readings have never been held to its periods, and are not now.
func Rules ¶
Rules holds a cycle to one of its two forms: equal periods of periodMonths from startMonth, or named periods (TAXONOMY.md D40). A list of named periods is all yearly ({name, endMonth}) or all dated ({name, end}), each name used once, and yearly ones run in the order of the year, so no two overlap and the year's start can be read off the last.
Types ¶
type Period ¶
type Period struct {
// End is the month the period ends, as YYYY-MM: the key a reading is
// filed under.
End string
// Start is the month it starts, as YYYY-MM.
Start string
// Name is the period's own name, for a cycle of named periods.
Name string
// Label is what a person reads: the name with its year ("Term I
// 2026/27") for a yearly named period, the name alone for a dated one,
// and empty for a regular cycle, whose periods are named by month.
Label string
// Due is the day its reading is due: the period's last day plus the
// cycle's dueOffsetDays, as YYYY-MM-DD.
Due string
}
Period is one period of a cycle.