public function asString(): string
    {
        return (string) $this->year . '-' . ((10 > $this->month && strlen((string) $this->month) === 1) ? ('0' . $this->month) : ($this->month));
    }
public function asString(): string
    {
        return (string) $this->year . '-' . ((10 > $this->month && strlen((string) $this->month) === 1) ? ('0' . $this->month) : ($this->month));
    }
public function asString ( ) : string { return ( string ) $ this -> year . '-' . ( ( 10 > $ this -> month && strlen ( ( string ) $ this -> month ) === 1 ) ? ( '0' . $ this -> month ) : ( $ this -> month ) ) ; }
returns a string representation of the date object

@return  string
returns a string representation of the date object