public function getHoursLoggedForLastMonth($project = null, $branches = null)
    {
        $startDate   = date_format(date_sub(date_create(), date_interval_create_from_date_string('1 month')), 'm/01/Y');
        $endDate = date_format(date_sub(date_create(), date_interval_create_from_date_string('1 month')), 'm/t/Y');

        return $this->getHoursLoggedFor($startDate, $endDate, $project, $branches);
    }
public function getHoursLoggedForLastMonth($project = null, $branches = null)
    {
        $startDate   = date_format(date_sub(date_create(), date_interval_create_from_date_string('1 month')), 'm/01/Y');
        $endDate = date_format(date_sub(date_create(), date_interval_create_from_date_string('1 month')), 'm/t/Y');

        return $this->getHoursLoggedFor($startDate, $endDate, $project, $branches);
    }
public function getHoursLoggedForLastMonth ( $ project = null , $ branches = null ) { $ startDate = date_format ( date_sub ( date_create ( ) , date_interval_create_from_date_string ( '1 month' ) ) , 'm/01/Y' ) ; $ endDate = date_format ( date_sub ( date_create ( ) , date_interval_create_from_date_string ( '1 month' ) ) , 'm/t/Y' ) ; return $ this -> getHoursLoggedFor ( $ startDate , $ endDate , $ project , $ branches ) ; }
Calculates hours logged for last month.
You can optionally specify a project.

@param null $project
@param null|string $branches
@return int
Calculates hours logged for last month . You can optionally specify a project .