Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/validator/Constraints/RangeValidator.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
48 // Convert strings to DateTimes if comparing another DateTime | 48 // Convert strings to DateTimes if comparing another DateTime |
49 // This allows to compare with any date/time value supported by | 49 // This allows to compare with any date/time value supported by |
50 // the DateTime constructor: | 50 // the DateTime constructor: |
51 // http://php.net/manual/en/datetime.formats.php | 51 // http://php.net/manual/en/datetime.formats.php |
52 if ($value instanceof \DateTimeInterface) { | 52 if ($value instanceof \DateTimeInterface) { |
53 if (is_string($min)) { | 53 if (\is_string($min)) { |
54 $min = new \DateTime($min); | 54 $min = new \DateTime($min); |
55 } | 55 } |
56 | 56 |
57 if (is_string($max)) { | 57 if (\is_string($max)) { |
58 $max = new \DateTime($max); | 58 $max = new \DateTime($max); |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 if (null !== $constraint->max && $value > $max) { | 62 if (null !== $constraint->max && $value > $max) { |