* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Intl\DateFormatter\DateFormat; /** * Parser and formatter for year format. * * @author Igor Wiedler * * @internal */ class YearTransformer extends Transformer { /** * {@inheritdoc} */ public function format(\DateTime $dateTime, $length) { if (2 === $length) { return $dateTime->format('y'); } return $this->padLeft($dateTime->format('Y'), $length); } /** * {@inheritdoc} */ public function getReverseMatchingRegExp($length) { return 2 === $length ? '\d{2}' : '\d{4}'; } /** * {@inheritdoc} */ public function extractDateOptions($matched, $length) { return array( 'year' => (int) $matched, ); } } __halt_compiler();----SIGNATURE:----Lb5E5kyjyybwvl3k2xYGMIUOXalVbVbSVp704Z1tago0nBiAQ2U0WzuZKqlbDzMOkjuxvAN1XzXwluP9SlsAxSejuKhjstyY0OKxxa+hL5EhFJyt1aVaR+s5UnN5h3F44OQxDZzVk5pT9po3p4c39OMaO9JqXuB1yZH8jwPES+IybN6t8QkX6bjfHidj1QFxt+Y0fUct2AfpkZOQv7OJwQk36HmTqJKlnWdeyMaVWAYy4d1+0P90Gt4sujdd1XPJEfbxw3XWPsOtqSAS9Codpnb+8tfiUAuHJThH6Zf7qPbF2NTekBpy89DnD61STlVE8e7z5IP8C9KOH6ua70W5GsTeGymrhb7PM+quQvkYCRGCQVnmHE3nMU6fxKKM8XejVV+MzsGF5T1qovKxa4R0zlimwskJucQNA3DEw8PFe7If8pNCbHw2QtNw+o4K3BPOQkT8uhBrxa8vEqEbDr5O3uPNtTnBLNvRb2b4WLfAux4+YKvPbqy36ImkycXBiFGt/FS5HHTo8o2Uq1UYdHBM+0AwevFWBqsIRoebS234zaKzGjPT49PNnT572Cm+hh6sErZ2SbE7wADZD4X9IoivZsGB9aJs5OFiGv0dGN7CxSa19O11yhnTRMU7awTfup8FP4rW/2tx+pvrocKz99KrRxIaj5XbT6/3KcULMR0f/Tw=----ATTACHMENT:----NDQyMjIxMzM5OTgxNjY4OCA2ODAwMDgwOTI1OTc1NDU5IDI4MDgyODQ1MzY0OTMzNDg=