| 18 | } |
| 19 | |
| 20 | bool DoesIncludeAll(osmoh::Timespan const & openingTime, osmoh::TTimespans const & spans) |
| 21 | { |
| 22 | if (spans.empty()) |
| 23 | return true; |
| 24 | |
| 25 | auto const openingTimeStart = openingTime.GetStart().GetHourMinutes().GetDuration(); |
| 26 | auto const openingTimeEnd = openingTime.GetEnd().GetHourMinutes().GetDuration(); |
| 27 | auto const excludeTimeStart = spans.front().GetStart().GetHourMinutes().GetDuration(); |
| 28 | auto const excludeTimeEnd = spans.back().GetEnd().GetHourMinutes().GetDuration(); |
| 29 | |
| 30 | if (!openingTime.HasExtendedHours() && (excludeTimeStart < openingTimeStart || openingTimeEnd < excludeTimeEnd)) |
| 31 | return false; |
| 32 | |
| 33 | return true; |
| 34 | } |
| 35 | |
| 36 | bool FixTimeSpans(osmoh::Timespan openingTime, osmoh::TTimespans & spans) |
| 37 | { |
no test coverage detected