src/Marando/AstroDate/Traits/FormatTrait.php
private function format_g(&$str) {
    if (strstr($str, '%g')) {
      $h   = $this->hour > 12 ? $this->hour - 12 : $this->hour;
      $str = str_replace('%g', sprintf('%1d', $h), $str);
    }
  }
private function format_g(&$str) {
    if (strstr($str, '%g')) {
      $h   = $this->hour > 12 ? $this->hour - 12 : $this->hour;
      $str = str_replace('%g', sprintf('%1d', $h), $str);
    }
  }
12-hour format of an hour without leading zeros
@param type $str