code: private function format_h(&$str) {
      if (strstr($str, '%h')) {
        $h   = $this->hour > 12 ? $this->hour - 12 : $this->hour;
        $str = str_replace('%h', sprintf('%02d', $h), $str);
      }
    }
docs: 12-hour format of an hour with leading zeros
  @param type $str