public function withDateAtEndOfMonth() : self
    {
        $instance = $this->withDateAtStartOfMonth();
        
        $instance->date->modify('+1 month');
        $instance->date->modify('-1 day');
        
        return $instance;
    }
public function withDateAtEndOfMonth() : self
    {
        $instance = $this->withDateAtStartOfMonth();
        
        $instance->date->modify('+1 month');
        $instance->date->modify('-1 day');
        
        return $instance;
    }
public function withDateAtEndOfMonth ( ) : self { $ instance = $ this -> withDateAtStartOfMonth ( ) ; $ instance -> date -> modify ( '+1 month' ) ; $ instance -> date -> modify ( '-1 day' ) ; return $ instance ; }
Returns a new instance with the date set to last day of the current month and time set to midnight.

@return self
Returns a new instance with the date set to last day of the current month and time set to midnight .