From 5c9843d873f0387390e3a1469d4aa562b30d10cd Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 31 Jul 2022 20:38:18 +1000 Subject: [PATCH] [REF] Fix Test fails on import by ensuring that Month Abberviations are formatted based on the first of each month --- CRM/Utils/Date.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index de3ccd2508df..f3add192515b 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -234,18 +234,18 @@ public static function &getAbbrMonthNames($month = FALSE) { if (empty(\Civi::$statics[__CLASS__][$key])) { $intl_formatter = IntlDateFormatter::create(CRM_Core_I18n::getLocale(), IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM, NULL, IntlDateFormatter::GREGORIAN, 'MMM'); \Civi::$statics[__CLASS__][$key] = [ - 1 => $intl_formatter->format(strtotime('January')), - 2 => $intl_formatter->format(strtotime('February')), - 3 => $intl_formatter->format(strtotime('March')), - 4 => $intl_formatter->format(strtotime('April')), - 5 => $intl_formatter->format(strtotime('May')), - 6 => $intl_formatter->format(strtotime('June')), - 7 => $intl_formatter->format(strtotime('July')), - 8 => $intl_formatter->format(strtotime('August')), - 9 => $intl_formatter->format(strtotime('September')), - 10 => $intl_formatter->format(strtotime('October')), - 11 => $intl_formatter->format(strtotime('November')), - 12 => $intl_formatter->format(strtotime('December')), + 1 => $intl_formatter->format(strtotime('1 January')), + 2 => $intl_formatter->format(strtotime('1 February')), + 3 => $intl_formatter->format(strtotime('1 March')), + 4 => $intl_formatter->format(strtotime('1 April')), + 5 => $intl_formatter->format(strtotime('1 May')), + 6 => $intl_formatter->format(strtotime('1 June')), + 7 => $intl_formatter->format(strtotime('1 July')), + 8 => $intl_formatter->format(strtotime('1 August')), + 9 => $intl_formatter->format(strtotime('1 September')), + 10 => $intl_formatter->format(strtotime('1 October')), + 11 => $intl_formatter->format(strtotime('1 November')), + 12 => $intl_formatter->format(strtotime('1 December')), ]; } if ($month) {