* * 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:----eMatmo//QUWwPNXe6RoVZWvOAm3++I626v6xeAnRMOXKn+0zvh0RCP0sKVuwytUpIfCEM7Z7EOyDnpdxY0aVKGVAYzXzBPKTg5HE72gWDXhYYQicWsmlYaFDqKRNIapUEswo9/4BCAe15cDtxbSUiUnIqrTlvfHVosWDX7LSqtCNO9i9pZN4MEmckpXzH4l/6xV4O9iXCDpC0plTtgQ7NmIYUk+PLaWzVsY69SQeFI/kpQLXs3jvADaL7btHSNPl2kd4sSZK6Zz0GFMOoRcJmO2EYAoKSRZyIeH2vnkkCIUc9OwlRPq0wt8AAiKIDWf7M3xjGeCVRRA0SgBI1bpfY2rhcvWRJU8RU+qo39xx3OK9JRwQD60aEDFXBPAhKJwy6b069nw2nddqzD2dAiK3v2IO41Q5RgU2mbsSqwonM5FC2W1ANbrJmKVGxD8dKFjzOmbBgeT6zcrSEMxEyVX5ErDZFF9ZGmZL8Y4XmSBdR1B79OctEGzIMJ9EY8i+r7RrYURvhxQldfg7K0MmhjS63VpYVJL0YEd8MUPuOQEjp6VyG0VKHlGE37oggTTntU6WCOS+QhDYNiXJtdWLa7vIeEcEjgfdBUcfgRFSAY+iXBiACXBk89wu/XIdk+UFzhKsDtIg2/AH0KsHBi8yTj1gfaJnCsBUX2/cPrdjWfrX3Jc=----ATTACHMENT:----OTQzNDM5ODAyOTUzNjM2MSAyODg0MzgzNjU1MzA1MzI1IDI4ODkyNzMyMDMyMzc3OTg=