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

Function NormalizeEnd

3party/opening_hours/rules_evaluation.cpp:74–84  ·  view source on GitHub ↗

Fill result with fields that present in start and missing in end. 2015 Jan 30 - Feb 20 <=> 2015 Jan 30 - 2015 Feb 20 2015 Jan 01 - 22 <=> 2015 Jan 01 - 2015 Jan 22

Source from the content-addressed store, hash-verified

72// 2015 Jan 30 - Feb 20 <=> 2015 Jan 30 - 2015 Feb 20
73// 2015 Jan 01 - 22 <=> 2015 Jan 01 - 2015 Jan 22
74osmoh::MonthDay NormalizeEnd(osmoh::MonthDay const & start, osmoh::MonthDay const & end)
75{
76 osmoh::MonthDay result = start;
77 if (end.HasYear())
78 result.SetYear(end.GetYear());
79 if (end.HasMonth())
80 result.SetMonth(end.GetMonth());
81 if (end.HasDayNum())
82 result.SetDayNum(end.GetDayNum());
83 return result;
84}
85
86uint8_t GetWeekNumber(std::tm const & date)
87{

Callers 1

IsActiveFunction · 0.85

Calls 9

HasYearMethod · 0.80
SetYearMethod · 0.80
GetYearMethod · 0.80
HasMonthMethod · 0.80
SetMonthMethod · 0.80
GetMonthMethod · 0.80
HasDayNumMethod · 0.80
SetDayNumMethod · 0.80
GetDayNumMethod · 0.80

Tested by

no test coverage detected