コード例 #1
0
 public function test_getLocalizedLocaleNPE()
 {
     TestHelper::assertNullException($this, function () {
         DateTimeFormatterBuilder::getLocalizedDateTimePattern(FormatStyle::SHORT(), FormatStyle::SHORT(), IsoChronology::INSTANCE(), null);
     });
 }
コード例 #2
0
 public function data_formatStyle()
 {
     return [[ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::ZONEID_PARIS()), FormatStyle::FULL(), "Tuesday, October 2, 2001 1:02:03 AM CEST Europe/Paris"], [ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::ZONEID_PARIS()), FormatStyle::LONG(), "October 2, 2001 1:02:03 AM CEST Europe/Paris"], [ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::ZONEID_PARIS()), FormatStyle::MEDIUM(), "Oct 2, 2001, 1:02:03 AM Europe/Paris"], [ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::ZONEID_PARIS()), FormatStyle::SHORT(), "10/2/01, 1:02 AM Europe/Paris"], [ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::OFFSET_PTWO()), FormatStyle::FULL(), "Tuesday, October 2, 2001 at 1:02:03 AM +02:00 +02:00"], [ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::OFFSET_PTWO()), FormatStyle::LONG(), "October 2, 2001 at 1:02:03 AM +02:00 +02:00"], [ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::OFFSET_PTWO()), FormatStyle::MEDIUM(), "Oct 2, 2001, 1:02:03 AM +02:00"], [ZonedDateTime::ofDateTime(LocalDateTime::of(2001, 10, 2, 1, 2, 3), self::OFFSET_PTWO()), FormatStyle::SHORT(), "10/2/01, 1:02 AM +02:00"]];
 }
コード例 #3
0
 function data_time()
 {
     return [[LocalTime::of(11, 30), FormatStyle::SHORT(), \IntlDateFormatter::SHORT, Locale::UK()], [LocalTime::of(11, 30), FormatStyle::SHORT(), \IntlDateFormatter::SHORT, Locale::US()], [LocalTime::of(11, 30), FormatStyle::SHORT(), \IntlDateFormatter::SHORT, Locale::FRANCE()], [LocalTime::of(11, 30), FormatStyle::SHORT(), \IntlDateFormatter::SHORT, Locale::JAPAN()], [LocalTime::of(11, 30), FormatStyle::MEDIUM(), \IntlDateFormatter::MEDIUM, Locale::UK()], [LocalTime::of(11, 30), FormatStyle::MEDIUM(), \IntlDateFormatter::MEDIUM, Locale::US()], [LocalTime::of(11, 30), FormatStyle::MEDIUM(), \IntlDateFormatter::MEDIUM, Locale::FRANCE()], [LocalTime::of(11, 30), FormatStyle::MEDIUM(), \IntlDateFormatter::MEDIUM, Locale::JAPAN()]];
 }