mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
a => A (fixes #15380)
This commit is contained in:
@ -37,6 +37,7 @@ Yii Framework 2 Change Log
|
||||
- Enh #15340: Test CHANGELOG.md for valid format (sammousa)
|
||||
- Enh #15360: Refactored `BaseConsole::updateProgress()` (developeruz)
|
||||
- Bug #15317: Regenerate CSRF token if an empty value is given (sammousa)
|
||||
- Bug #15380: `FormatConverter::convertDateIcuToPhp()` now converts `a` ICU symbols to `A` (brandonkelly)
|
||||
|
||||
|
||||
|
||||
|
@ -185,7 +185,7 @@ class BaseFormatConverter
|
||||
'cccc' => 'l',
|
||||
'ccccc' => '',
|
||||
'cccccc' => '',
|
||||
'a' => 'a', // am/pm marker
|
||||
'a' => 'A', // AM/PM marker
|
||||
'h' => 'g', // 12-hour format of an hour without leading zeros 1 to 12h
|
||||
'hh' => 'h', // 12-hour format of an hour with leading zeros, 01 to 12 h
|
||||
'H' => 'G', // 24-hour format of an hour without leading zeros 0 to 23h
|
||||
|
@ -45,13 +45,13 @@ class FormatConverterTest extends TestCase
|
||||
|
||||
public function testEscapedIcuToPhp()
|
||||
{
|
||||
$this->assertEquals('l, F j, Y \\a\\t g:i:s a T', FormatConverter::convertDateIcuToPhp('EEEE, MMMM d, y \'at\' h:mm:ss a zzzz'));
|
||||
$this->assertEquals('l, F j, Y \\a\\t g:i:s A T', FormatConverter::convertDateIcuToPhp('EEEE, MMMM d, y \'at\' h:mm:ss a zzzz'));
|
||||
$this->assertEquals('\\o\\\'\\c\\l\\o\\c\\k', FormatConverter::convertDateIcuToPhp('\'o\'\'clock\''));
|
||||
}
|
||||
|
||||
public function testEscapedIcuToJui()
|
||||
{
|
||||
$this->assertEquals('l, F j, Y \\a\\t g:i:s a T', FormatConverter::convertDateIcuToPhp('EEEE, MMMM d, y \'at\' h:mm:ss a zzzz'));
|
||||
$this->assertEquals('l, F j, Y \\a\\t g:i:s A T', FormatConverter::convertDateIcuToPhp('EEEE, MMMM d, y \'at\' h:mm:ss a zzzz'));
|
||||
$this->assertEquals('\'o\'\'clock\'', FormatConverter::convertDateIcuToJui('\'o\'\'clock\''));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user