Prado\I18N\core\DateFormat::getHour12 PHP Method

getHour12() protected method

"h" for non-padding, "hh" will always return 2 characters.
protected getHour12 ( $date, $pattern = 'h' ) : string
return string hours in 12 hour format.
    protected function getHour12($date, $pattern = 'h')
    {
        $hour = $date['hours'];
        $hour = $hour == 12 | $hour == 0 ? 12 : $hour % 12;
        switch ($pattern) {
            case 'h':
                return $hour;
            case 'hh':
                return str_pad($hour, 2, '0', STR_PAD_LEFT);
            default:
                throw new Exception('The pattern for 24 hour ' . 'format is "H" or "HH".');
        }
    }