public function format($format = null): string
    {
        if (empty($format)) {
            return $this->birthday;
        }

        return date($format, strtotime($this->birthday));
    }
public function format($format = null): string
    {
        if (empty($format)) {
            return $this->birthday;
        }

        return date($format, strtotime($this->birthday));
    }
public function format ( $ format = null ) : string { if ( empty ( $ format ) ) { return $ this -> birthday ; } return date ( $ format , strtotime ( $ this -> birthday ) ) ; }
Return the birthday in given format

@param  string   $format
@return string
Return the birthday in given format