diff --git a/src/View/Helper/DateFormat.php b/src/View/Helper/DateFormat.php index ec4af321..c7dffb69 100644 --- a/src/View/Helper/DateFormat.php +++ b/src/View/Helper/DateFormat.php @@ -90,7 +90,7 @@ public function __invoke( } // DateTime support for IntlDateFormatter::format() was only added in 5.3.4 - if ($date instanceof DateTime && version_compare(PHP_VERSION, '5.3.4', '<')) { + if ($date instanceof DateTime && (PHP_VERSION_ID < 50304)) { $date = $date->getTimestamp(); } @@ -134,7 +134,7 @@ public function setTimezone($timezone) $this->timezone = (string) $timezone; // The method setTimeZoneId is deprecated as of PHP 5.5.0 - $setTimeZoneMethodName = (PHP_VERSION_ID < '50500') ? 'setTimeZoneId' : 'setTimeZone'; + $setTimeZoneMethodName = (PHP_VERSION_ID < 50500) ? 'setTimeZoneId' : 'setTimeZone'; foreach ($this->formatters as $formatter) { $formatter->$setTimeZoneMethodName($this->timezone);