PHP Class Roomify\Bat\Event\EventInterval

A utility class that brings togehter functions we end up using often across Bat to hand Event Intervals.
Show file Open project: roomify/bat Class Usage Examples

Public Methods

Method Description
divide ( DateTime $start_date, DateTime $end_date, DateInterval $duration ) : float Return the number of times a duration fits into the start and end date taking into account BAT's consideration that the end time for a BAT event includes that last minute.

Method Details

divide() public static method

Return the number of times a duration fits into the start and end date taking into account BAT's consideration that the end time for a BAT event includes that last minute.
public static divide ( DateTime $start_date, DateTime $end_date, DateInterval $duration ) : float
$start_date DateTime
$end_date DateTime
$duration DateInterval
return float