From 22c7d3f6a330cf549743762190b9e80baaebc5e8 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Wed, 19 Jul 2023 23:58:19 +0200 Subject: [PATCH 1/3] chore(3rdparty): update punic to 3.8.1 Signed-off-by: Daniel Kesselberg --- 3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty b/3rdparty index 593f3f5581ff5..1ff71da76e24d 160000 --- a/3rdparty +++ b/3rdparty @@ -1 +1 @@ -Subproject commit 593f3f5581ff5724ffa8d2917eca7fc991624e90 +Subproject commit 1ff71da76e24d442afab28586072409ef3b9660e From 06248cda0a21180ee732f8927b471da1f56f2dfe Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 24 Jul 2023 16:52:49 +0200 Subject: [PATCH 2/3] chore: update expected timezone from GMT+0 to UTC Punic 3.2.0 added support for timezone translations and returns UTC instead of GMT+0 now. Signed-off-by: Daniel Kesselberg --- tests/lib/L10N/L10nTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php index 67ad58435461b..79f85e892c7de 100644 --- a/tests/lib/L10N/L10nTest.php +++ b/tests/lib/L10N/L10nTest.php @@ -118,20 +118,20 @@ public function testPlaceholders($string, $expected): void { public function localizationData() { return [ // timestamp as string - ['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', '1234567890'], - ['13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', '1234567890'], + ['February 13, 2009 at 11:31:30 PM UTC', 'en', 'en_US', 'datetime', '1234567890'], + ['13. Februar 2009 um 23:31:30 UTC', 'de', 'de_DE', 'datetime', '1234567890'], ['February 13, 2009', 'en', 'en_US', 'date', '1234567890'], ['13. Februar 2009', 'de', 'de_DE', 'date', '1234567890'], - ['11:31:30 PM GMT+0', 'en', 'en_US', 'time', '1234567890'], - ['23:31:30 GMT+0', 'de', 'de_DE', 'time', '1234567890'], + ['11:31:30 PM UTC', 'en', 'en_US', 'time', '1234567890'], + ['23:31:30 UTC', 'de', 'de_DE', 'time', '1234567890'], // timestamp as int - ['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', 1234567890], - ['13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', 1234567890], + ['February 13, 2009 at 11:31:30 PM UTC', 'en', 'en_US', 'datetime', 1234567890], + ['13. Februar 2009 um 23:31:30 UTC', 'de', 'de_DE', 'datetime', 1234567890], ['February 13, 2009', 'en', 'en_US', 'date', 1234567890], ['13. Februar 2009', 'de', 'de_DE', 'date', 1234567890], - ['11:31:30 PM GMT+0', 'en', 'en_US', 'time', 1234567890], - ['23:31:30 GMT+0', 'de', 'de_DE', 'time', 1234567890], + ['11:31:30 PM UTC', 'en', 'en_US', 'time', 1234567890], + ['23:31:30 UTC', 'de', 'de_DE', 'time', 1234567890], // DateTime object ['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', new DateTime('@1234567890')], From 68eecca4d4cf9c4a9ebda1db064a1ef789d6affb Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 24 Jul 2023 18:41:22 +0200 Subject: [PATCH 3/3] chore: update expected results for CLDR 42 Punic 3.8.0 / CLDR 42 added a narrow no-break space unicode character for the time formats and a new default pattern for datetime. Signed-off-by: Daniel Kesselberg --- tests/lib/DateTimeFormatterTest.php | 6 +++--- tests/lib/L10N/L10nTest.php | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index 2ca880ec132a9..71d98ba758133 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -163,8 +163,8 @@ public function testFormatDate($timestamp, $expected) { public function formatDateTimeData() { return [ - [1350129205, null, 'October 13, 2012 at 11:53:25 AM GMT+0'], - [1350129205, new \DateTimeZone('Europe/Berlin'), 'October 13, 2012 at 1:53:25 PM GMT+2'], + [1350129205, null, "October 13, 2012, 11:53:25\xE2\x80\xAFAM UTC"], + [1350129205, new \DateTimeZone('Europe/Berlin'), "October 13, 2012, 1:53:25\xE2\x80\xAFPM GMT+2"], ]; } @@ -175,7 +175,7 @@ public function testFormatDateTime($timestamp, $timeZone, $expected) { $this->assertEquals($expected, (string) $this->formatter->formatDateTime($timestamp, 'long', 'long', $timeZone)); } - + public function testFormatDateWithInvalidTZ() { $this->expectException(\Exception::class); diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php index 79f85e892c7de..bd1fce295472b 100644 --- a/tests/lib/L10N/L10nTest.php +++ b/tests/lib/L10N/L10nTest.php @@ -118,34 +118,34 @@ public function testPlaceholders($string, $expected): void { public function localizationData() { return [ // timestamp as string - ['February 13, 2009 at 11:31:30 PM UTC', 'en', 'en_US', 'datetime', '1234567890'], - ['13. Februar 2009 um 23:31:30 UTC', 'de', 'de_DE', 'datetime', '1234567890'], + ["February 13, 2009, 11:31:30\xE2\x80\xAFPM UTC", 'en', 'en_US', 'datetime', '1234567890'], + ['13. Februar 2009, 23:31:30 UTC', 'de', 'de_DE', 'datetime', '1234567890'], ['February 13, 2009', 'en', 'en_US', 'date', '1234567890'], ['13. Februar 2009', 'de', 'de_DE', 'date', '1234567890'], - ['11:31:30 PM UTC', 'en', 'en_US', 'time', '1234567890'], + ["11:31:30\xE2\x80\xAFPM UTC", 'en', 'en_US', 'time', '1234567890'], ['23:31:30 UTC', 'de', 'de_DE', 'time', '1234567890'], // timestamp as int - ['February 13, 2009 at 11:31:30 PM UTC', 'en', 'en_US', 'datetime', 1234567890], - ['13. Februar 2009 um 23:31:30 UTC', 'de', 'de_DE', 'datetime', 1234567890], + ["February 13, 2009, 11:31:30\xE2\x80\xAFPM UTC", 'en', 'en_US', 'datetime', 1234567890], + ['13. Februar 2009, 23:31:30 UTC', 'de', 'de_DE', 'datetime', 1234567890], ['February 13, 2009', 'en', 'en_US', 'date', 1234567890], ['13. Februar 2009', 'de', 'de_DE', 'date', 1234567890], - ['11:31:30 PM UTC', 'en', 'en_US', 'time', 1234567890], + ["11:31:30\xE2\x80\xAFPM UTC", 'en', 'en_US', 'time', 1234567890], ['23:31:30 UTC', 'de', 'de_DE', 'time', 1234567890], // DateTime object - ['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', new DateTime('@1234567890')], - ['13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', new DateTime('@1234567890')], + ["February 13, 2009, 11:31:30\xE2\x80\xAFPM GMT+0", 'en', 'en_US', 'datetime', new DateTime('@1234567890')], + ['13. Februar 2009, 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', new DateTime('@1234567890')], ['February 13, 2009', 'en', 'en_US', 'date', new DateTime('@1234567890')], ['13. Februar 2009', 'de', 'de_DE', 'date', new DateTime('@1234567890')], - ['11:31:30 PM GMT+0', 'en', 'en_US', 'time', new DateTime('@1234567890')], + ["11:31:30\xE2\x80\xAFPM GMT+0", 'en', 'en_US', 'time', new DateTime('@1234567890')], ['23:31:30 GMT+0', 'de', 'de_DE', 'time', new DateTime('@1234567890')], // en_GB - ['13 February 2009 at 23:31:30 GMT+0', 'en_GB', 'en_GB', 'datetime', new DateTime('@1234567890')], + ['13 February 2009, 23:31:30 GMT+0', 'en_GB', 'en_GB', 'datetime', new DateTime('@1234567890')], ['13 February 2009', 'en_GB', 'en_GB', 'date', new DateTime('@1234567890')], ['23:31:30 GMT+0', 'en_GB', 'en_GB', 'time', new DateTime('@1234567890')], - ['13 February 2009 at 23:31:30 GMT+0', 'en-GB', 'en_GB', 'datetime', new DateTime('@1234567890')], + ['13 February 2009, 23:31:30 GMT+0', 'en-GB', 'en_GB', 'datetime', new DateTime('@1234567890')], ['13 February 2009', 'en-GB', 'en_GB', 'date', new DateTime('@1234567890')], ['23:31:30 GMT+0', 'en-GB', 'en_GB', 'time', new DateTime('@1234567890')], ];