aboutsummaryrefslogtreecommitdiff
path: root/internal/calendar/computus_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 12:13:07 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 12:13:07 +0200
commit4c76a397cc1395b207e106580897fa64ef039cef (patch)
tree9756473292dcd60a5d18e6935563e694afbfde6a /internal/calendar/computus_test.go
parentb4982d22be0c79949046c9d957354209996acb2e (diff)
downloadlectio-4c76a397cc1395b207e106580897fa64ef039cef.tar.gz
lectio-4c76a397cc1395b207e106580897fa64ef039cef.zip
feat(calendar): core types + Gregorian Computus
Diffstat (limited to 'internal/calendar/computus_test.go')
-rw-r--r--internal/calendar/computus_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/calendar/computus_test.go b/internal/calendar/computus_test.go
new file mode 100644
index 0000000..c524093
--- /dev/null
+++ b/internal/calendar/computus_test.go
@@ -0,0 +1,20 @@
+package calendar
+
+import (
+ "testing"
+)
+
+func TestEasterKnownDates(t *testing.T) {
+ // Published Gregorian Easter Sundays.
+ cases := map[int]string{
+ 2020: "2020-04-12", 2021: "2021-04-04", 2022: "2022-04-17",
+ 2024: "2024-03-31", 2025: "2025-04-20", 2027: "2027-03-28",
+ 2038: "2038-04-25", 2000: "2000-04-23",
+ }
+ for y, want := range cases {
+ got := Easter(y).Format("2006-01-02")
+ if got != want {
+ t.Errorf("Easter(%d) = %s, want %s", y, got, want)
+ }
+ }
+}