fix: read one-sided booking times as "ab" and "bis"

This commit is contained in:
fromme committed 2026-09-25 16:20:06 +02:00
1 parent 179769187b
commit bbb0a8aaa2
4 files changed
+29 -4

No files matched your search

+8
View File
@@ -149,6 +149,14 @@ class TimeRangeTest extends TestCase
self::assertSame('yes', $twig->render('t', ['range' => TimeRange::wholeDay()]));
}
public function testAOneSidedRangeReadsAsAbOrBis(): void
{
self::assertSame('bis 13:00', (string) TimeRange::fromMinutes(TimeRange::DAY_START, 13 * 60));
self::assertSame('ab 13:00', (string) TimeRange::fromMinutes(13 * 60, TimeRange::DAY_END));
self::assertSame('09:00–13:00', (string) TimeRange::fromMinutes(9 * 60, 13 * 60));
self::assertSame('ganztägig', (string) TimeRange::wholeDay());
}
/**
* @param list<TimeRange> $ranges
*