mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 22:48:45 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -26,14 +26,14 @@ class DateComparator extends Comparator
|
||||
public function __construct(string $test)
|
||||
{
|
||||
if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) {
|
||||
throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test));
|
||||
throw new \InvalidArgumentException(\sprintf('Don\'t understand "%s" as a date test.', $test));
|
||||
}
|
||||
|
||||
try {
|
||||
$date = new \DateTimeImmutable($matches[2]);
|
||||
$target = $date->format('U');
|
||||
} catch (\Exception) {
|
||||
throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
|
||||
throw new \InvalidArgumentException(\sprintf('"%s" is not a valid date.', $matches[2]));
|
||||
}
|
||||
|
||||
$operator = $matches[1] ?: '==';
|
||||
|
||||
Reference in New Issue
Block a user