DD, YYYY". * * @param string $dateString date which needs to converted to human readable format * * @param null $dateFormat * @param bool $onlyTime * * @return string human readable date format | invalid date message * @access public */ function smarty_modifier_crmDate($dateString, $dateFormat = NULL, $onlyTime = FALSE) { if ($dateString) { // this check needs to be type sensitive // CRM-3689, CRM-2441 if ($dateFormat === 0) { $dateFormat = NULL; } if ($onlyTime) { $config = CRM_Core_Config::singleton(); $dateFormat = $config->dateformatTime; } return CRM_Utils_Date::customFormat($dateString, $dateFormat); } return ''; }