package calendar import "testing" func TestTemporalEFSeasons(t *testing.T) { cases := []struct { date string season Season }{ {"2025-01-01", Christmas}, // Circumcision {"2025-01-20", TimeAfterEpiphany}, // after II Sunday after Epiphany {"2025-02-16", Septuagesima}, // Septuagesima Sunday (easter-63) {"2025-03-05", Lent}, // Ash Wednesday {"2025-04-06", Passiontide}, // Passion Sunday (easter-14) {"2025-04-13", Passiontide}, // Palm Sunday {"2025-04-20", Easter_}, // Easter {"2025-06-08", Easter_}, // Pentecost (still Paschaltide) {"2025-06-15", TimeAfterPentecost}, // Trinity {"2025-06-22", TimeAfterPentecost}, // II Sunday after Pentecost {"2025-10-26", TimeAfterPentecost}, // Christ the King {"2025-11-30", Advent}, // I Sunday of Advent {"2025-12-25", Christmas}, // Nativity } for _, c := range cases { got := temporalEF(d(c.date)) if got.Season != c.season { t.Errorf("temporalEF(%s).Season = %s, want %s", c.date, got.Season, c.season) } } } func TestTemporalEFChristTheKing(t *testing.T) { // EF: last Sunday of October (2025-10-26), not the last before Advent. if got := temporalEF(d("2025-10-26")); got.Cel.Slug != "ef-christ-the-king" { t.Errorf("2025-10-26 slug = %q want ef-christ-the-king", got.Cel.Slug) } if got := efChristTheKing(2025).Format("2006-01-02"); got != "2025-10-26" { t.Errorf("efChristTheKing(2025) = %s want 2025-10-26", got) } }