Skip to content

Commit

Permalink
Merge pull request #24100 from seamuslee001/fix_date_format
Browse files Browse the repository at this point in the history
[REF] Fix Test fails on import by ensuring that Month Abbreviations a…
  • Loading branch information
demeritcowboy authored Jul 31, 2022
2 parents 7bf0c13 + 5c9843d commit 121b197
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions CRM/Utils/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 121b197

Please sign in to comment.