DurationManager
Table of Contents
Methods
- __construct() : mixed
- areDurationsEqual() : bool
- getDuration() : int
- returns difference between start and end (in seconds)
- getFormattedDuration() : string
- Example: "1 day 8 hours 13 minutes"
- isPositiveDuration() : bool
- returns true if duration is longer than 1 minute, false otherwise
Methods
__construct()
public
__construct(Date $start, Date $end) : mixed
Parameters
areDurationsEqual()
public
areDurationsEqual(Date $start, Date $end) : bool
Parameters
Return values
boolgetDuration()
returns difference between start and end (in seconds)
public
getDuration() : int
Return values
intgetFormattedDuration()
Example: "1 day 8 hours 13 minutes"
public
getFormattedDuration() : string
Return values
stringisPositiveDuration()
returns true if duration is longer than 1 minute, false otherwise
public
isPositiveDuration() : bool