lib/Fabulator/Endomondo/EndomondoApi.php
public function getWorkoutBetween(\DateTime $from, \DateTime $to)
    {
        $workouts = $this->getWorkoutsUntil($to, 1);

        /* @var $workout Workout */
        $workout = $workouts['workouts'][0];

        if (!$workout) {
            return null;
        }

        if ($workout->getStart() > $from) {
            return $workout;
        }

        return null;
    }
public function getWorkoutBetween(\DateTime $from, \DateTime $to)
    {
        $workouts = $this->getWorkoutsUntil($to, 1);

        /* @var $workout Workout */
        $workout = $workouts['workouts'][0];

        if (!$workout) {
            return null;
        }

        if ($workout->getStart() > $from) {
            return $workout;
        }

        return null;
    }
public function getWorkoutBetween ( \ DateTime $ from , \ DateTime $ to ) { $ workouts = $ this -> getWorkoutsUntil ( $ to , 1 ) ; /* @var $workout Workout */ $ workout = $ workouts [ 'workouts' ] [ 0 ] ; if ( ! $ workout ) { return null ; } if ( $ workout -> getStart ( ) > $ from ) { return $ workout ; } return null ; }
Try to find a single workout between two dates.

@param \DateTime $from
@param \DateTime $to
@return Workout|null
Try to find a single workout between two dates .