Release 2.9.0 (#4526)
* added fix to work around bc break in new phpword version * fix phpoffice deprecations * mark unused option as deprecated * support for DateTimeInterface and DateTimeImmutable where possible * use TRUSTED_PROXIES setting - fixes #4533 * re-enable Kimai test in docker test build script (#4541) * bump dependencies
This commit is contained in:
@@ -62,10 +62,10 @@ final class LocaleFormatExtensions extends AbstractExtension implements LocaleAw
|
||||
return [
|
||||
new TwigTest('weekend', [$this, 'isWeekend']),
|
||||
new TwigTest('today', function ($dateTime): bool {
|
||||
if (!$dateTime instanceof \DateTime) {
|
||||
if (!$dateTime instanceof \DateTimeInterface) {
|
||||
return false;
|
||||
}
|
||||
$compare = new \DateTime('now', $dateTime->getTimezone());
|
||||
$compare = new \DateTimeImmutable('now', $dateTime->getTimezone());
|
||||
|
||||
return $compare->format('Y-m-d') === $dateTime->format('Y-m-d');
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user