Swat/SwatTimeEntry.php
private function getFormattedTime(SwatDate $time)
    {
        $format = '';

        if ($this->display_parts & self::HOUR) {
            $format .= $this->twelve_hour ? 'h' : 'H';
            if ($this->display_parts & (self::MINUTE | self::SECOND)) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::MINUTE) {
            $format .= 'mm';
            if ($this->display_parts & self::SECOND) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::SECOND) {
            $format .= 'ss';
        }

        if ($this->display_parts & self::HOUR && $this->twelve_hour) {
            $format .= ' a';
        }

        return $time->formatLikeIntl($format);
    }
private function getFormattedTime(SwatDate $time)
    {
        $format = '';

        if ($this->display_parts & self::HOUR) {
            $format .= $this->twelve_hour ? 'h' : 'H';
            if ($this->display_parts & (self::MINUTE | self::SECOND)) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::MINUTE) {
            $format .= 'mm';
            if ($this->display_parts & self::SECOND) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::SECOND) {
            $format .= 'ss';
        }

        if ($this->display_parts & self::HOUR && $this->twelve_hour) {
            $format .= ' a';
        }

        return $time->formatLikeIntl($format);
    }
private function getFormattedTime ( SwatDate $ time ) { $ format = '' ; if ( $ this -> display_parts & self :: HOUR ) { $ format .= $ this -> twelve_hour ? 'h' : 'H' ; if ( $ this -> display_parts & ( self :: MINUTE | self :: SECOND ) ) { $ format .= ':' ; } } if ( $ this -> display_parts & self :: MINUTE ) { $ format .= 'mm' ; if ( $ this -> display_parts & self :: SECOND ) { $ format .= ':' ; } } if ( $ this -> display_parts & self :: SECOND ) { $ format .= 'ss' ; } if ( $ this -> display_parts & self :: HOUR && $ this -> twelve_hour ) { $ format .= ' a' ; } return $ time -> formatLikeIntl ( $ format ) ; }
Formats a time for display in error messages

@param SwatDate $time the time to format.

@return string the formatted time.
Formats a time for display in error messages