区间重合算法:多个时间段重合判断

Talk is cheap, show you the code

 '2019-01-01', 'end_day' => '2019-01-31'],
    ['start_day' => '2018-01-01', 'end_day' => '2018-01-31'],
    ['start_day' => '2019-03-01', 'end_day' => '2019-05-31'],
    ['start_day' => '2019-10-01', 'end_day' => '2019-10-31'],
    ['start_day' => '2019-04-01', 'end_day' => '2019-04-10'],
];
var_dump(is_time_cross($data));

你可能感兴趣的:(区间重合算法:多个时间段重合判断)