From f2d30bf7460557c2d88973f883cc00b2fb926fea Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 27 Feb 2017 18:23:51 +1300 Subject: [PATCH] Remove function I added for date handling. In the end I opted to leave the date handling in smarty & have not unravelled our custom version of strftime formatting --- CRM/Core/Smarty/plugins/modifier.crmDate.php | 4 ---- CRM/Utils/Date.php | 21 -------------------- 2 files changed, 25 deletions(-) diff --git a/CRM/Core/Smarty/plugins/modifier.crmDate.php b/CRM/Core/Smarty/plugins/modifier.crmDate.php index 8e2afb6a59..11b001abd7 100644 --- a/CRM/Core/Smarty/plugins/modifier.crmDate.php +++ b/CRM/Core/Smarty/plugins/modifier.crmDate.php @@ -56,10 +56,6 @@ function smarty_modifier_crmDate($dateString, $dateFormat = NULL, $onlyTime = FA $config = CRM_Core_Config::singleton(); $dateFormat = $config->dateformatTime; } - // Handle possibility we only have a date function style date format. - if ($dateFormat && !stristr($dateFormat, '%')) { - return date($dateFormat, strtotime($dateString)); - } return CRM_Utils_Date::customFormat($dateString, $dateFormat); } diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index af8faf9808..a533c16d93 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -1787,27 +1787,6 @@ class CRM_Utils_Date { return $mysqlDate; } - /** - * Convert a Civi-special date string to a standard php date string. - * - * For historical reasons CiviCRM has it's own (possibly Smarty derived) - * format for defined date strings. This renders something php can use. - * - * @param string $dateFormatString - * e.g mm/dd/yy - * These map to the values used in the date_format field in civicrm_custom_field.date_format. - * - * @return string - * A proper php strotime formatted equivalent of the string. - * eg m/d/y for the above. - * - * http://php.net/manual/en/function.strtotime.php - */ - public static function getPhpDateFormatFromInputStyleDateFormat($dateFormatString) { - $formats = CRM_Utils_Date::datePluginToPHPFormats(); - return $formats[$dateFormatString]; - } - /** * Add the metadata about a date field to the field. * -- 2.25.1