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

@@ -99,6 +99,7 @@ final class IconExtension extends AbstractExtension
'users' => 'fas fa-user-friends',
'visibility' => 'far fa-eye',
'warning' => 'fas fa-exclamation-triangle',
'weekly-times' => 'fas fa-th',
'xlsx' => 'fas fa-file-excel',
];

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');
}),
];
}