1 | <?php |
||
14 | class MonthNameUnlocalizer { |
||
15 | |||
16 | /** |
||
17 | * @var string[] Array mapping localized to canonical (English) month names. |
||
18 | */ |
||
19 | private $replacements = array(); |
||
20 | |||
21 | /** |
||
22 | * @param string[] $replacements Array mapping localized month names (possibly including full |
||
23 | * month names, genitive names and abbreviations) to canonical (English) month names. |
||
24 | */ |
||
25 | 11 | public function __construct( array $replacements ) { |
|
33 | |||
34 | /** |
||
35 | * Unlocalizes the longest month name in a date string that could be found first. |
||
36 | * Tries to avoid doing multiple replacements and returns the localized original if in doubt. |
||
37 | * |
||
38 | * @see NumberUnlocalizer::unlocalizeNumber |
||
39 | * |
||
40 | * @param string $date Localized date string. |
||
41 | * |
||
42 | * @return string Unlocalized date string. |
||
43 | */ |
||
44 | 11 | public function unlocalize( $date ) { |
|
73 | |||
74 | } |
||
75 |