* * 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:----Dh6vOBUCDRnz6WSYQat+hychJdzwOr4/TZK4P6WWTccmC49Kb4sYVLAOMhhIPh8FUli4RoTIGMh/3aP+hp0qyJ2AYfdR+yzTnkvJTD0blK+pnuL9dU2hXl+IUe3etGs0UP1EyTOT+YlZMeTNui6wOuqTXXhoB9QLQ2HZ8Q8HXb5BIvB2RlIDZvqlWXka3/biB4YsaHc8icK1GhhZC5VHdE0KBn3EJuwBmXBoBmEliXSAyeZvqbyBDGWDEWarJvFNr+ZxYTvTOnqr00nosI8VoxeE3OmfuBiXV58uwY2On1H0eP9X+EeH8iEj3LOtp+ZCqDUDfmsugslPLAA9zU0q6Bj4XvC+ycscbXOtFQN7XHY09MneX5vOn4Z8tNPNEhCNpXBjn9g09lJWxySRAdM2sE5UfzNClVjjzzVmitbYq/Or6mDexySbaPRv03jweoXtvF4+jsNAEKZfh7PuTSfuec9LiX0/zDWsKh7ctJqI2k7AOtAMUbdJkel44PO4mLRmEHJn4SUDNV5jqc/z9WZTN2Dc/rzjuqkiQu8BDQk9lwa4ShKHrrYpYYmrKxm1oBj5ppYaZsJ46EQ5cU3QZ/F5BYuHAcOUQFbMA9hlGbvT6f1fAclMIR3gNSgJmhYh3jAl0i0Jp7WMdDzTcqR1IhHNUEPyazPiQ4HAhNvWwOaoZ2o=----ATTACHMENT:----MzQzNDI5Nzk3ODY0NjEzIDU0MTIyOTc1OTc0MTAzMDAgNjU4ODU4MjA4NTkzNjYxMQ==