getDayLabel now surfaces the transfer signal added in the previous commit: a transferred-in winner gets "(Rank, transferred)" instead of just "(Rank)"; a transferred-in commemoration gets "(transferred)" appended to its bare name; and the date a saint transferred away from gets a trailing "St. X (transferred away)" note so a reader isn't left wondering why an expected saint is missing that day. Deliberately worded differently on the two sides (plain "transferred" reads as "arrived via transfer" next to a rank parenthetical; "transferred away" spells out the direction on the origin date, where there's no rank alongside it to anchor that reading) and deliberately omits a landing date on the away note, per direct instruction, since a real landing can chain further than the single adjacent day resolveDay actually checks (an unmodeled case, e.g. a transfer running into Holy Week). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013g7AsSvMD9oazR17f3BxLz
This commit is contained in:
@@ -34,8 +34,12 @@ describe('getDayLabel — ordinal temporal label', () => {
|
||||
expect(getDayLabel(resolveDay('2026-05-31')).en).toBe(
|
||||
'The Queenship of the Blessed Virgin Mary (Duplex II Class) — Trinity Sunday',
|
||||
);
|
||||
expect(getDayLabel(resolveDay('2026-04-05')).en).toBe('Easter (Duplex I Class)');
|
||||
expect(getDayLabel(resolveDay('2026-02-18')).en).toBe('Ash Wednesday');
|
||||
expect(getDayLabel(resolveDay('2026-04-05')).en).toBe(
|
||||
"Easter (Duplex I Class) — St. Vincent Ferrer, Confessor (transferred away)",
|
||||
);
|
||||
expect(getDayLabel(resolveDay('2026-02-18')).en).toBe(
|
||||
"Ash Wednesday — St. Simeon, Bishop and Martyr (transferred away)",
|
||||
);
|
||||
// Latin: the winner now has a real authored nameLa (see
|
||||
// calendar/data/calendar/saints/queenship-of-the-bvm.yml), so this is
|
||||
// real Latin throughout — the rank label ("Duplex II. Classis") and
|
||||
@@ -44,8 +48,12 @@ describe('getDayLabel — ordinal temporal label', () => {
|
||||
expect(getDayLabel(resolveDay('2026-05-31')).la).toBe(
|
||||
'Beata Maria Virgo Regina (Duplex II. Classis) — Dominica Sanctissimae Trinitatis',
|
||||
);
|
||||
expect(getDayLabel(resolveDay('2026-04-05')).la).toBe('Pascha (Duplex I. Classis)');
|
||||
expect(getDayLabel(resolveDay('2026-02-18')).la).toBe('Feria Quarta Cinerum');
|
||||
expect(getDayLabel(resolveDay('2026-04-05')).la).toBe(
|
||||
'Pascha (Duplex I. Classis) — Sanctus Vincentius Ferrerius, Confessor (translata alio)',
|
||||
);
|
||||
expect(getDayLabel(resolveDay('2026-02-18')).la).toBe(
|
||||
'Feria Quarta Cinerum — Sanctus Simeon, Episcopus et Martyr (translata alio)',
|
||||
);
|
||||
});
|
||||
|
||||
it('gives the correct week-after-Trinity ordinal', () => {
|
||||
@@ -117,7 +125,9 @@ describe('getDayLabel — resumed post-Epiphany Sunday (overflow years)', () =>
|
||||
expect(getDayLabel(resolveDay('2024-11-11')).en).toBe(
|
||||
'St. Martin of Tours, Bishop and Confessor (Duplex Majus) — St. Menna, Martyr',
|
||||
);
|
||||
expect(getDayLabel(resolveDay('2024-11-17')).en).toBe('The 6th Sunday after Epiphany (Semiduplex)');
|
||||
expect(getDayLabel(resolveDay('2024-11-17')).en).toBe(
|
||||
"The 6th Sunday after Epiphany (Semiduplex) — St. Gregory Thaumaturgus, Bishop and Confessor (transferred away)",
|
||||
);
|
||||
// 2024-11-18 is the Dedication of the Basilicas of Ss. Peter and Paul
|
||||
// (pre-existing fixed content) -- again a real winning saint, not the
|
||||
// ferial fallback -- with St. Gregory Thaumaturgus (Semiduplex,
|
||||
@@ -126,7 +136,7 @@ describe('getDayLabel — resumed post-Epiphany Sunday (overflow years)', () =>
|
||||
// transfers to the next open day rather than being commemorated in
|
||||
// place, and Nov 18 is that day.
|
||||
expect(getDayLabel(resolveDay('2024-11-18')).en).toBe(
|
||||
'Dedication of the Basilicas of Ss. Peter and Paul (Duplex) — St. Gregory Thaumaturgus, Bishop and Confessor',
|
||||
'Dedication of the Basilicas of Ss. Peter and Paul (Duplex) — St. Gregory Thaumaturgus, Bishop and Confessor (transferred)',
|
||||
);
|
||||
// 2035-10-29, a Monday in the 3rd week of a different overflow
|
||||
// stretch, is genuinely clean (no sanctoral entry, no commemoration)
|
||||
@@ -147,9 +157,11 @@ describe('getDayLabel — resumed post-Epiphany Sunday (overflow years)', () =>
|
||||
// Thaumaturgus above -- landing on 2026-11-23 instead, where St.
|
||||
// Clement already natively wins; Cecilia loses that tied collision
|
||||
// (both Semiduplex) and joins St. Felicitas as a commemoration there.
|
||||
expect(getDayLabel(resolveDay('2026-11-22')).en).toBe('The 23rd Sunday after Trinity (Semiduplex)');
|
||||
expect(getDayLabel(resolveDay('2026-11-22')).en).toBe(
|
||||
"The 23rd Sunday after Trinity (Semiduplex) — St. Cecilia, Virgin and Martyr (transferred away)",
|
||||
);
|
||||
expect(getDayLabel(resolveDay('2026-11-23')).en).toBe(
|
||||
'St. Clement I, Pope and Martyr (Semiduplex) — St. Felicitas, Martyr — St. Cecilia, Virgin and Martyr',
|
||||
'St. Clement I, Pope and Martyr (Semiduplex) — St. Felicitas, Martyr — St. Cecilia, Virgin and Martyr (transferred)',
|
||||
);
|
||||
// 1943-11-21 is also the Presentation of the BVM (Duplex Majus, added
|
||||
// 2026-08 — see presentation-of-the-bvm.yml). It's `ordinary-sunday`
|
||||
@@ -399,7 +411,7 @@ describe('getDayLabel/getVespersStatusLabel — Vespers evening with a temporal
|
||||
expect(day.date).toBe('2026-08-30');
|
||||
expect(day.winner).toEqual({ kind: 'temporal', id: 'post-pentecost-14' });
|
||||
expect(getDayLabel(day).en).toBe(
|
||||
'The 13th Sunday after Trinity (Semiduplex) — Ss. Felix and Adauctus, Martyrs — The Beheading of St. John the Baptist (of today)',
|
||||
"The 13th Sunday after Trinity (Semiduplex) — Ss. Felix and Adauctus, Martyrs — The Beheading of St. John the Baptist (of today) — St. Rose of Lima, Virgin (transferred away)",
|
||||
);
|
||||
expect(getVespersStatusLabel(day, '2026-08-29').en).toBe('First Vespers (of tomorrow)');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user