Closed MichMich closed 4 years ago
Not sure based on the documentation. Does this package also work with time stamps, or does it only compare the dates? The examples only show dates, but since the period accepts DateTime objects, it might also work with time.
DateTime
For example, would this work?
$a = Period::make('2020-01-01 12:00:00', '2020-01-01 14:00:00'); $a = Period::make('2020-01-01 16:00:00', '2020-01-01 18:00:00'); $overlap = $a->gap($b); // Period('2020-01-01 14:00:00', '2020-01-01 16:00:00')
Thanks!
Figured out it can handle seconds by setting the precision. Thanks!
Not sure based on the documentation. Does this package also work with time stamps, or does it only compare the dates? The examples only show dates, but since the period accepts
DateTime
objects, it might also work with time.For example, would this work?
Thanks!