Download this file
| 1 | package calendar |
| 2 | |
| 3 | import "testing" |
| 4 | |
| 5 | func TestAllDayConversionRoundsANonMidnightEndUp(t *testing.T) { |
| 6 | if got := roundedAllDayEnd("2026-09-23", "2026-09-23", "2026-09-23T13:00"); got != "2026-09-24" { |
| 7 | t.Fatalf("end = %q, want next day", got) |
| 8 | } |
| 9 | if got := roundedAllDayEnd("2026-09-23", "2026-09-24", "2026-09-24T00:00"); got != "2026-09-24" { |
| 10 | t.Fatalf("midnight end = %q", got) |
| 11 | } |
| 12 | } |
| 13 | |