/**
  * @param int|string|null $dateType Constant of IntlDateFormatter (NONE, FULL, LONG, MEDIUM, SHORT) or it's name
  * @param int|string|null $timeType Constant of IntlDateFormatter (NONE, FULL, LONG, MEDIUM, SHORT) or it's name
  * @param string|null $locale
  * @return string
  */
 protected function getFormat($dateType, $timeType, $locale)
 {
     return $this->convertFormat($this->formatter->getPattern($dateType, $timeType, $locale));
 }
Exemplo n.º 2
0
 /**
  * @dataProvider getDatePatternDataProvider
  */
 public function testGetDatePattern($expectedDateType, $expectedTimeType, $dateType, $timeType, $locale)
 {
     $expected = $this->getPattern($locale, $expectedDateType, $expectedTimeType);
     $this->assertEquals($expected, $this->formatter->getPattern($dateType, $timeType, $locale));
 }