public function getHoursLoggedForLast($period, $project = null, $branches = null)
    {
        $endDate = date('m/d/Y');
        $startDate   = date_format(date_sub(date_create($endDate), date_interval_create_from_date_string($period)), 'm/d/Y');

        return $this->getHoursLoggedFor($startDate, $endDate, $project, $branches);
    }
public function getHoursLoggedForLast($period, $project = null, $branches = null)
    {
        $endDate = date('m/d/Y');
        $startDate   = date_format(date_sub(date_create($endDate), date_interval_create_from_date_string($period)), 'm/d/Y');

        return $this->getHoursLoggedFor($startDate, $endDate, $project, $branches);
    }
public function getHoursLoggedForLast ( $ period , $ project = null , $ branches = null ) { $ endDate = date ( 'm/d/Y' ) ; $ startDate = date_format ( date_sub ( date_create ( $ endDate ) , date_interval_create_from_date_string ( $ period ) ) , 'm/d/Y' ) ; return $ this -> getHoursLoggedFor ( $ startDate , $ endDate , $ project , $ branches ) ; }
Calculates hours logged in last xy days, months ...
You can optionally specify a project.

@param $period
@param null $project
@param null|string $branches
@return int
Calculates hours logged in last xy days months ... You can optionally specify a project .