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

Method GetStatusInInterval

libs/transit/transit_schedule.cpp:162–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162Status DatesInterval::GetStatusInInterval(Date const & date, uint8_t wdIndex) const
163{
164 auto const & [date1, date2, wd] = Extract();
165
166 if (GetDatesRelation(date, date1) != DateTimeRelation::Earlier &&
167 GetDatesRelation(date, date2) != DateTimeRelation::Later)
168 {
169 return wd[wdIndex] ? Status::Open : Status::Closed;
170 }
171
172 return Status::Closed;
173}
174
175bool DatesInterval::operator==(DatesInterval const & rhs) const
176{

Callers 2

GetStatusMethod · 0.80
GetFrequencyMethod · 0.80

Calls 1

GetDatesRelationFunction · 0.85

Tested by

no test coverage detected