diff --git a/src/php-8.1-strftime.php b/src/php-8.1-strftime.php index 0846c35..9cc196c 100644 --- a/src/php-8.1-strftime.php +++ b/src/php-8.1-strftime.php @@ -50,7 +50,7 @@ function strftime (string $format, $timestamp = null, ?string $locale = null) : '%A' => 'EEEE', // A full textual representation of the day Sunday through Saturday '%b' => 'LLL', // Abbreviated month name, based on the locale Jan through Dec '%B' => 'MMMM', // Full month name, based on the locale January through December - '%h' => 'MMM', // Abbreviated month name, based on the locale (an alias of %b) Jan through Dec + '%h' => 'LLL', // Abbreviated month name, based on the locale (an alias of %b) Jan through Dec ]; $intl_formatter = function (DateTimeInterface $timestamp, string $format) use ($intl_formats, $locale) { diff --git a/tests/strftimeTest.php b/tests/strftimeTest.php index c1e19fb..5355dc3 100644 --- a/tests/strftimeTest.php +++ b/tests/strftimeTest.php @@ -85,6 +85,9 @@ public function testMonthFormats () { $result = strftime('%h', '20220306 13:02:03', 'en-EN'); $this->assertEquals('Mar', $result, '%h: Abbreviated month name, based on the locale (an alias of %b)'); + $result = strftime('%h', '20220706 13:02:03', 'de-DE'); + $this->assertEquals(strftime('%b', '20220706 13:02:03', 'de-DE'), $result, '%h: Abbreviated month name, based on the locale (an alias of %b)'); + $result = strftime('%m', '20220306 13:02:03'); $this->assertEquals('03', $result, '%m: Two digit representation of the month'); }