NULL_DATE is now a constant

This commit is contained in:
Michael 2017-02-27 23:37:15 +00:00
parent 86c6c48bd8
commit 0afb0c2ea4
21 changed files with 162 additions and 146 deletions

View file

@ -36,7 +36,7 @@ function smarty_modifier_date_format($string, $format = null, $default_date = ''
* Include the {@link shared.make_timestamp.php} plugin
*/
require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
if ($string != '' && $string != '0000-00-00' && $string != '0000-00-00 00:00:00') {
if ($string != '' && $string > '0001-01-01' && $string > NULL_DATE) {
$timestamp = smarty_make_timestamp($string);
} elseif ($default_date != '') {
$timestamp = smarty_make_timestamp($default_date);