Name Ember days in the day label, demoted or winning outright

calendar/day-label.ts never surfaced an Ember day's own identity
anywhere: collectCommemorations only matched a temporal commemoration
against resolveTemporalId(day.date), never an Ember-relabeled id, and
the winning-outright fallback used the generic ordinal weekday label
with no id awareness at all. Adds a standalone emberDayLabel lookup,
deliberately kept out of temporal-feasts.ts since that table doubles
as isFerialOrVigil's bareness check and would have silently turned
off Ember days' own ferial Preces.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGjUyhUZJaSjiniEmnLdak
This commit is contained in:
2026-09-04 07:12:32 -04:00
parent 03d39dc911
commit 88e8a5b404
3 changed files with 74 additions and 1 deletions
+16
View File
@@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest';
import { resolveDay } from '../../src/calendar';
import { getDayLabel } from '../../src/calendar/day-label';
import { resolveOrdo } from '../../src/hours';
import { getDayCollect } from '../../src/hours/resolve-common';
@@ -89,6 +90,21 @@ describe('Ember days', () => {
expect(antiphon.text.status.en).toBe('verified');
});
it("the day label names the Ember day itself, both when it's demoted to a commemoration and when it wins outright -- previously never shown anywhere in the UI (2026-09-03 fix)", () => {
// Demoted cases (2026): a saint wins outright, Ember rides along as a
// commemoration -- collectCommemorations' temporal branch previously
// only matched resolveTemporalId(day.date), never an Ember-relabeled id.
expect(getDayLabel(resolveDay('2026-09-16')).en).toContain('Ember Wednesday in September');
expect(getDayLabel(resolveDay('2026-09-18')).en).toContain('Ember Friday in September');
expect(getDayLabel(resolveDay('2026-09-19')).en).toContain('Ember Saturday in September');
// Winning-outright cases: previously fell through to the plain
// ordinal weekday label with no Ember mention at all.
expect(getDayLabel(resolveDay('2023-09-20')).en).toBe('Ember Wednesday in September (Feria) — Vigil of St. Matthew');
expect(getDayLabel(resolveDay('2026-12-16')).en).toBe('Ember Wednesday in Advent (Feria)');
expect(getDayLabel(resolveDay('2026-12-18')).en).toBe('Ember Friday in Advent (Feria)');
expect(getDayLabel(resolveDay('2026-12-19')).en).toContain('Ember Saturday in Advent (Feria)');
});
it('Matins renders 3 real, distinct, verified lessons+responsories for each of the 6 Ember days', () => {
const dates = ['2026-09-16', '2026-09-18', '2026-09-19', '2026-12-16', '2026-12-18', '2026-12-19'];
for (const date of dates) {