MCPcopy Create free account
hub / github.com/comaps/comaps / SpanLength

Function SpanLength

libs/editor/opening_hours_ui.cpp:12–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace editor::ui;
11
12size_t SpanLength(osmoh::Timespan const & span)
13{
14 using osmoh::operator""_h;
15 auto const start = span.GetStart().GetHourMinutes().GetDurationCount();
16 auto const end = span.GetEnd().GetHourMinutes().GetDurationCount();
17 return end - start + (span.HasExtendedHours() ? osmoh::HourMinutes::TMinutes(24_h).count() : 0);
18}
19
20bool DoesIncludeAll(osmoh::Timespan const & openingTime, osmoh::TTimespans const & spans)
21{

Callers 2

FixTimeSpansFunction · 0.85
GetLongetsOpenSpanFunction · 0.85

Calls 5

GetDurationCountMethod · 0.80
HasExtendedHoursMethod · 0.80
GetStartMethod · 0.45
GetEndMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected