diff options
Diffstat (limited to 'internal/calendar/temporal.go')
| -rw-r--r-- | internal/calendar/temporal.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/calendar/temporal.go b/internal/calendar/temporal.go index dadae49..b0dc653 100644 --- a/internal/calendar/temporal.go +++ b/internal/calendar/temporal.go @@ -223,13 +223,23 @@ func temporal(date time.Time, sel Selection) temporalDay { return ferialDay(Advent, "advent-"+itoa(week)+"-"+weekdayAbbr(wd), Violet, week, privFeria) case !date.Before(christmasThis): // Dec 25..Dec 31 — Christmas octave + // The octave-day ferials (Dec 29-31) have readings proper to the date; + // Dec 25-28 are the Nativity and its feasts (Stephen/John/Innocents). + if date.Day() >= 29 { + return ferialDay(Christmas, "christmas-dec-"+itoa(date.Day()), White, 0, false) + } return ferialDay(Christmas, "christmas-octave-"+weekdayAbbr(wd), White, 0, false) case !date.After(baptismThis): // Jan 1..Baptism — Christmas season if sun { return sundayDay(Christmas, "christmas-sunday-"+weekdayAbbr(wd), White, 0) } - return ferialDay(Christmas, "christmas-"+weekdayAbbr(wd), White, 0, false) + // Before Epiphany the weekdays are proper to the date (Jan 2-7); after + // Epiphany they are keyed by weekday (the days before the Baptism). + if date.Before(epiphany(y, sel)) { + return ferialDay(Christmas, "christmas-jan-"+itoa(date.Day()), White, 0, false) + } + return ferialDay(Christmas, "christmas-after-epiphany-"+weekdayAbbr(wd), White, 0, false) default: // Ordinary Time (span 1: after Baptism..before Lent; span 2: after Pentecost..before Advent) var week int |
