Model St. Clare and surface active octaves in the day label
Deploy / deploy (push) Successful in 52s
Deploy / deploy (push) Successful in 52s
Today (Aug 12, within St. Lawrence's octave) was resolving as a plain
ferial day: St. Clare wasn't modeled in the calendar at all, and even
once an octave commemoration exists, getDayLabel only ever looked for a
sanctoral commemoration, never an octave one, so the label fell all the
way through to the generic ordinal week label.
Adds St. Clare (Simplex under Monastic 1617, correctly losing to
Lawrence's octave and only commemorated -- live-verified against three
clean years). Extends getDayLabel to show the active octave itself as
the day's primary identity when nothing else has won outright (e.g.
"3rd Day within the Octave of St. Lawrence, Martyr -- St. Clare,
Virgin"), matching what the live reference engine actually titles these
days, rather than falling back to an anonymous ordinal week label.
Also fixes a regression this surfaced: Trinity Sunday is technically
also day 8 of Pentecost's own octave, and the naive octave-first check
was shadowing its own anchor-day name ("8th Day within the Octave of
Pentecost" instead of "Trinity Sunday"). A season's own named anchor day
now always outranks an active octave label.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,26 @@ describe('getDayLabel — ordinal temporal label', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getDayLabel — active octave', () => {
|
||||
it('shows the octave day itself as the primary label, plus a lesser saint commemorated alongside it', () => {
|
||||
// St. Lawrence's own octave (Aug 10-17); Aug 12 is day 3, and also St.
|
||||
// Clare's own day -- Simplex, below the octave's semiduplex threshold,
|
||||
// so she's commemorated rather than winning. Matches the live engine's
|
||||
// own title for this date directly (see saints/st-clare.yml).
|
||||
expect(getDayLabel(resolveDay('2026-08-12'))).toBe('3rd Day within the Octave of St. Lawrence, Martyr — St. Clare, Virgin');
|
||||
});
|
||||
|
||||
it('shows the octave day alone when nothing is separately commemorated that day', () => {
|
||||
// Aug 17 is day 8 (the last day) of St. Lawrence's octave, with no
|
||||
// sanctoral candidate of its own in this app's calendar.
|
||||
expect(getDayLabel(resolveDay('2026-08-17'))).toBe('8th Day within the Octave of St. Lawrence, Martyr');
|
||||
});
|
||||
|
||||
it("a season's own named anchor day outranks an active octave, even though Trinity Sunday is technically also day 8 of Pentecost's own octave", () => {
|
||||
expect(getDayLabel(resolveDay('2026-05-31'))).toBe('Trinity Sunday');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getDayLabel — feast name combination', () => {
|
||||
const base: LiturgicalDay = {
|
||||
date: '2026-06-15',
|
||||
|
||||
Reference in New Issue
Block a user