|
@@ -32,7 +32,10 @@ class DateComparator extends Comparator
|
|
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));
|
|
}
|
|
}
|
|
|
|
|
|
- if (false === $target = @strtotime($matches[2])) {
|
|
|
|
|
|
+ try {
|
|
|
|
+ $date = new \DateTime($matches[2]);
|
|
|
|
+ $target = $date->format('U');
|
|
|
|
+ } catch (\Exception $e) {
|
|
throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
|
|
throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
|
|
}
|
|
}
|
|
|
|
|