1 | <?php |
||
19 | class YearTimeParser extends StringValueParser { |
||
20 | |||
21 | const FORMAT_NAME = 'year'; |
||
22 | |||
23 | /** |
||
24 | * Option to allow parsing of years with localized digit group separators. For example, the |
||
25 | * English year -10,000 (with a comma) is written as -10.000 (with a dot) in German. |
||
26 | */ |
||
27 | const OPT_DIGIT_GROUP_SEPARATOR = 'digitGroupSeparator'; |
||
28 | |||
29 | /** |
||
30 | * Default, canonical digit group separator, as in the year -10,000. |
||
31 | */ |
||
32 | const CANONICAL_DIGIT_GROUP_SEPARATOR = ','; |
||
33 | |||
34 | /** |
||
35 | * @var ValueParser |
||
36 | */ |
||
37 | private $eraParser; |
||
38 | |||
39 | /** |
||
40 | * @var ValueParser |
||
41 | */ |
||
42 | private $isoTimestampParser; |
||
43 | |||
44 | /** |
||
45 | * @see StringValueParser::__construct |
||
46 | * |
||
47 | * @param ValueParser|null $eraParser |
||
48 | * @param ParserOptions|null $options |
||
49 | */ |
||
50 | 40 | public function __construct( ValueParser $eraParser = null, ParserOptions $options = null ) { |
|
61 | |||
62 | /** |
||
63 | * @see StringValueParser::stringParse |
||
64 | * |
||
65 | * @param string $value |
||
66 | * |
||
67 | * @throws ParseException |
||
68 | * @return TimeValue |
||
69 | */ |
||
70 | 33 | protected function stringParse( $value ) { |
|
91 | |||
92 | } |
||
93 |