public function hour($value = null)
    {
        if ($value !== null) {
            if ($value > 23 || $value < 0) {
                $this->hour = 0;
            } else {
                $this->hour = $value;
            }
        }
        return $this->hour;
    }
public function hour($value = null)
    {
        if ($value !== null) {
            if ($value > 23 || $value < 0) {
                $this->hour = 0;
            } else {
                $this->hour = $value;
            }
        }
        return $this->hour;
    }
public function hour ( $ value = null ) { if ( $ value !== null ) { if ( $ value > 23 || $ value < 0 ) { $ this -> hour = 0 ; } else { $ this -> hour = $ value ; } } return $ this -> hour ; }
Set the hour field of the date object

@param int the hour
@return int the hour
Set the hour field of the date object