📅  最后修改于: 2022-03-11 14:49:07.240000             🧑  作者: Mango
if (interval.StartTime < interval.EndTime)
{
// Normal case, e.g. 8am-2pm
return interval.StartTime <= candidateTime && candidateTime < interval.EndTime;
}
else
{
// Reverse case, e.g. 10pm-2am
return interval.StartTime <= candidateTime || candidateTime < interval.EndTime;
}