* * 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:----JR8Tlap7HiHokVDsapE9M2yUJ9yKtQ15ZRnScBU+YHcseMIkFNuqQ9LLVRaYCrbBVmgcuruW4hOnZtZ5yXqfiHv+NYifkolxhuluLhLQ3SgTsvjbAkNRvKCscrl8bugO7DZP8ChSOcERCs+o/uzIhs0MYut5+PgmAI9chKKW3B50uYGveAEMtIQNFbJjwq1KUnU9KnaBKxU0il1uToDkS4sP30Gg3GnIHNjFAtuyUhCNtn1kSAFPMOFADsumsnF7Okwh8vUthOzCMUmPJhLtPPXIONgogGefpGRtoreIODjyuUVYOUMQ3/+uVjPzKFBxilIRnlJ+lkvgThdwkVa4Ft/q/MhSojwfFRhrqO57K4n/Ld+q5KEcYmzS/5ivIIqnFIHftbPQfeiQ1tO//thDG1dyzDQv45Jknq3o7RKaXKPuuOspK4Gn8ewX9T+C92PigxZeO35g5WQ9J5nSs0YOvlN5hFS0i7Lqnw3ujpHAqDaYibc4C42+ahdXxqPYDiacmHy0LniVeoXgmU1L+I84TzxnLumhN8Bx7mpUWCb8DX54xo5TpH2sjGU07wpn/5WFCV5OW3Ktl9z5AOpPBqTdnc3P4nA0hGvoI1ozjam8E3VWt0DIEXdIIpMyTVfJGcb8HlDBRYCuQ3dzHySo9ipSbNwFYrqgaKZrXi/7wXFArgQ=----ATTACHMENT:----MTAzMDY4NDU0MDMyMDk0NSAzMzcyMzM2MzU0NDAyMjU2IDMxMDU5MjY1Njg0NDkxMDc=