weekly quick-entry form (#2793)

This commit is contained in:
Kevin Papst
2021-10-18 11:12:46 +02:00
committed by GitHub
parent 64893e0a95
commit 9ab098af86
105 changed files with 3356 additions and 778 deletions

View File

@@ -80,6 +80,14 @@ final class LocaleFormatExtensions extends AbstractExtension
return ($day === 0 || $day === 6);
}),
new TwigTest('today', function ($dateTime) {
if (!$dateTime instanceof \DateTime) {
return false;
}
$compare = new \DateTime('now', $dateTime->getTimezone());
return $compare->format('Y-m-d') === $dateTime->format('Y-m-d');
}),
];
}