3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
21 * Convert the date string "YYYY-MM-DD" to "MM<long> DD, YYYY".
23 * @param string $dateString
24 * Date which needs to converted to human readable format.
26 * @param null $dateFormat
27 * @param bool $onlyTime
30 * human readable date format | invalid date message
32 function smarty_modifier_crmDate($dateString, $dateFormat = NULL, $onlyTime = FALSE) {
34 // this check needs to be type sensitive
36 if ($dateFormat === 0) {
40 $config = CRM_Core_Config
::singleton();
41 $dateFormat = $config->dateformatTime
;
44 return CRM_Utils_Date
::customFormat($dateString, $dateFormat);