diff --git a/src/I18n/Date.php b/src/I18n/Date.php new file mode 100644 index 00000000000..2e4ffd275b0 --- /dev/null +++ b/src/I18n/Date.php @@ -0,0 +1,62 @@ +i18nFormat(); + $expected = '1/14/10'; + $this->assertEquals($expected, $result); + + $result = $time->i18nFormat(\IntlDateFormatter::FULL, null, 'es-ES'); + $expected = 'jueves, 14 de enero de 2010, 0:00:00 (GMT)'; + $this->assertEquals($expected, $result); + + $format = [\IntlDateFormatter::NONE, \IntlDateFormatter::SHORT]; + $result = $time->i18nFormat($format); + $expected = '12:00 AM'; + $this->assertEquals($expected, $result); + + $result = $time->i18nFormat('HH:mm:ss', 'Australia/Sydney'); + $expected = '00:00:00'; + $this->assertEquals($expected, $result); + + Date::$defaultLocale = 'fr-FR'; + $result = $time->i18nFormat(\IntlDateFormatter::FULL); + $expected = 'jeudi 14 janvier 2010 00:00:00 UTC'; + $this->assertEquals($expected, $result); + + $result = $time->i18nFormat(\IntlDateFormatter::FULL, null, 'es-ES'); + $expected = 'jueves, 14 de enero de 2010, 0:00:00 (GMT)'; + $this->assertEquals($expected, $result, 'Default locale should not be used'); + } + + public function testToString() + { + $this->markTestIncomplete(); + } + + public function testJsonSerialize() + { + $this->markTestIncomplete(); + } + + public function testParseDate() + { + $this->markTestIncomplete(); + } + + public function testParseDateTime() + { + $this->markTestIncomplete(); + } +}