* * 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 12 hour format (0-11). * * @author Igor Wiedler * * @internal */ class Hour1200Transformer extends HourTransformer { /** * {@inheritdoc} */ public function format(\DateTime $dateTime, $length) { $hourOfDay = $dateTime->format('g'); $hourOfDay = '12' == $hourOfDay ? '0' : $hourOfDay; return $this->padLeft($hourOfDay, $length); } /** * {@inheritdoc} */ public function normalizeHour($hour, $marker = null) { if ('PM' === $marker) { $hour += 12; } return $hour; } /** * {@inheritdoc} */ public function getReverseMatchingRegExp($length) { return '\d{1,2}'; } /** * {@inheritdoc} */ public function extractDateOptions($matched, $length) { return array( 'hour' => (int) $matched, 'hourInstance' => $this, ); } } __halt_compiler();----SIGNATURE:----v/UhgB1xAqd23yfgHcRJ7uAuZN8Dz1opD5lxobeWk6EjhRwaPlc6egBUQ7r5U5hVG3a4CiXnqUj+fMbs69J6459xwHZ3Ks6k7SVJVPWxid+em8Jayh0pnLtw3ckcY4/khF2cxCN5sWJJyCYevwNLUggtlIeCuqBSBG6WfgaCHCvnEJpgFV6oMnooDAcSnUZqdolkZsAOXEtxCiz8eflo+iSvv6pn7gcSBRO60GTCDWAuW9pJvO97yCZP7TZYBFaIQcLnAJeMSfHbGbDgLuKwP/JPKfoe0AQ9b0jyEhuBZWgDUYn/dpN7oTzalXkyyz6KJxNKpXTVGu8cDVpxMMp1E/1lVCR47QUjdCB8fn6/s8jVxJuCUwiYIvVZVOYMZ2JgslwR4Dvc+UMKbGjCLabrsu1hFWB38F33Pfi2uqVR1w8IHdrjmfLRmVCTrKEy3R7PbA1mzHRtt9iWP9fE0ZwQi2TgIittg+SWQVoEeaN/3SGwynoYpAyZk8MdeGaeGhioqtqrdzcCwUGtdFE20i2Zig5j0Y6I/h7yVZHFakw3+cw6elHlvoI4YRDcS2PuQ/FU096b4qVbSpmbR9+DptLhU66ZVJc/1Zu0RPRe0o3pDujMhxnSelC5cAC8eyHVWpznKOJPHfuGxJ3UHHxQU6YHnpohiL1sZgp3h0NIaGdzbOY=----ATTACHMENT:----MzE2NzE4NzIzNTg5MDY1IDQ0NDM0OTM1Mjc4MjcyODEgMzg0NDEzNTY1ODkxMjk5Mg==