diff options
author | Christian Schneider | 2023-01-11 14:44:52 +0100 |
---|---|---|
committer | Christian Schneider | 2023-01-11 14:44:52 +0100 |
commit | 056614f0f59f5ee5d633b0e4e48fe5edec6dd3cb (patch) | |
tree | 1fffcd99a1d9076648e207f919ad55a7ea91d7e0 /it.class | |
parent | 78e3077d55fd6c7322f6c542dda328c0a19b7693 (diff) | |
download | itools-056614f0f59f5ee5d633b0e4e48fe5edec6dd3cb.tar.gz itools-056614f0f59f5ee5d633b0e4e48fe5edec6dd3cb.tar.bz2 itools-056614f0f59f5ee5d633b0e4e48fe5edec6dd3cb.zip |
Normalize double sign --/+-/-+/++ calculations in it::date for PHP 8.2 and add tests for it
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1044,7 +1044,7 @@ static function date($format = "", $stamp = null) if (!isset($stamp)) $stamp = it::time(); else if (is_string($stamp) && !ctype_digit($stamp)) - $stamp = strtotime($stamp, it::time()); + $stamp = strtotime(it::replace(['\s(--|\+\+)\s*(\d)' => ' +\2', '\s(\+-|-\+)\s*(\d)' => ' -\2'], $stamp), it::time()); list($name, $language) = explode(":", $format); |