configure first day of week for calendar and date-picker (#1952)

This commit is contained in:
Kevin Papst
2020-09-05 18:31:37 +02:00
committed by GitHub
parent ed528eb19a
commit 217960de60
30 changed files with 195 additions and 71 deletions

View File

@@ -89,7 +89,6 @@ class DateTimeFactoryTest extends TestCase
$this->assertEquals($expected->format('Y'), $dateTime->format('Y'));
$this->assertEquals(self::TEST_TIMEZONE, $dateTime->getTimezone()->getName());
$expected = new DateTime('now', new DateTimeZone(self::TEST_TIMEZONE));
$dateTime = $sut->getStartOfWeek();
$this->assertEquals(0, $dateTime->format('H'));
@@ -97,8 +96,7 @@ class DateTimeFactoryTest extends TestCase
$this->assertEquals(0, $dateTime->format('s'));
$this->assertEquals(1, $dateTime->format('N'));
$this->assertEquals('Monday', $dateTime->format('l'));
$this->assertEquals($expected->format('m'), $dateTime->format('m'));
$this->assertEquals($expected->format('Y'), $dateTime->format('Y'));
// month and year can be different when the week started at the end of the month
$this->assertEquals(self::TEST_TIMEZONE, $dateTime->getTimezone()->getName());
}