1 | <?php |
||
19 | class xsDateTime extends xsAnySimpleType |
||
20 | { |
||
21 | use MinMaxTrait; |
||
22 | |||
23 | /** |
||
24 | * Construct. |
||
25 | * |
||
26 | * @param string $value |
||
27 | */ |
||
28 | public function __construct($value) |
||
29 | { |
||
30 | parent::__construct($value); |
||
31 | $this->setWhiteSpaceFacet('collapse'); |
||
32 | } |
||
33 | |||
34 | public function fixValue() |
||
35 | { |
||
36 | parent::fixValue(); |
||
37 | $dateTimeValue = new \DateTime($this->value); |
||
38 | $this->value = $dateTimeValue->format('Y-m-d\TH:i:s') . $this->fixFractionOfSecond($dateTimeValue) . $dateTimeValue->format('P'); |
||
|
|||
39 | } |
||
40 | |||
41 | private function fixFractionOfSecond(\DateTime $dateTimeValue) |
||
48 | |||
49 | protected function isOK() |
||
50 | { |
||
53 | } |
||
54 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.