protected function getDates()
    {
        $date = new \DateTime ( "now" );
        $date->setTimezone ( new \DateTimeZone ( "America/Sao_Paulo" ) );

        $final = $date->format ( "Y-m-d\TH:i:s" );

        $dateInterval = "P" . ( string ) $this->_days . "D";
        $date->sub ( new \DateInterval ( $dateInterval ) );
        $date->setTime ( 00, 00, 00 );
        $initial = $date->format ( "Y-m-d\TH:i:s" );

        return [
            'initial' => $initial,
            'final'   => $final
        ];
    }
protected function getDates()
    {
        $date = new \DateTime ( "now" );
        $date->setTimezone ( new \DateTimeZone ( "America/Sao_Paulo" ) );

        $final = $date->format ( "Y-m-d\TH:i:s" );

        $dateInterval = "P" . ( string ) $this->_days . "D";
        $date->sub ( new \DateInterval ( $dateInterval ) );
        $date->setTime ( 00, 00, 00 );
        $initial = $date->format ( "Y-m-d\TH:i:s" );

        return [
            'initial' => $initial,
            'final'   => $final
        ];
    }
protected function getDates ( ) { $ date = new \ DateTime ( "now" ) ; $ date -> setTimezone ( new \ DateTimeZone ( "America/Sao_Paulo" ) ) ; $ final = $ date -> format ( "Y-m-d\TH:i:s" ) ; $ dateInterval = "P" . ( string ) $ this -> _days . "D" ; $ date -> sub ( new \ DateInterval ( $ dateInterval ) ) ; $ date -> setTime ( 00 , 00 , 00 ) ; $ initial = $ date -> format ( "Y-m-d\TH:i:s" ) ; return [ 'initial' => $ initial , 'final' => $ final ] ; }
Get date interval from days qty.

@return array
Get date interval from days qty .