Skip to content

Commit 041de67

Browse files
committed
test Locale
1 parent 46dee86 commit 041de67

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/strftimeTest.php

+11
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,15 @@ public function testMiscellaneousFormats () {
165165
$result = strftime('%%', '20220306 13:02:03');
166166
$this->assertEquals('%', $result, '%%: A literal percentage character ("%")');
167167
}
168+
169+
public function testLocale () {
170+
$result = strftime('%c', '20220306 13:02:03', 'eu');
171+
$this->assertEquals('2022(e)ko martxoaren 6(a) 13:02', $result, '%x: Preferred date representation based on locale, without the time');
172+
173+
$result = strftime('%b', '20220306 13:02:03', 'eu');
174+
$this->assertEquals('mar.', $result, '%b: Abbreviated month name, based on the locale');
175+
176+
$result = strftime('%B', '20220306 13:02:03', 'eu');
177+
$this->assertEquals('martxoa', $result, '%B: Full month name, based on the locale');
178+
}
168179
}

0 commit comments

Comments
 (0)