Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
FrmtrTimeShort | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
createFormatter | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
5 | */ |
6 | |
7 | declare(strict_types=1); |
8 | |
9 | namespace pvc\frmtr\date_time; |
10 | |
11 | use IntlDateFormatter; |
12 | |
13 | /** |
14 | * Class FrmtrTimeShort |
15 | */ |
16 | class FrmtrTimeShort extends FrmtrDateTimeAbstract |
17 | { |
18 | protected function createFormatter(): IntlDateFormatter |
19 | { |
20 | $dateType = IntlDateFormatter::NONE; |
21 | $timeType = IntlDateFormatter::SHORT; |
22 | |
23 | return new IntlDateFormatter( |
24 | (string)$this->getLocale(), |
25 | $dateType, |
26 | $timeType, |
27 | $this->getTimeZone()->getName(), |
28 | $this->getCalendarType() |
29 | ); |
30 | } |
31 | } |