MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / endDate

Method endDate

src/model/ScheduleRule.cpp:183–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 }
182
183 boost::optional<openstudio::Date> ScheduleRule_Impl::endDate() const {
184 boost::optional<openstudio::Date> result;
185 boost::optional<std::string> dateSpecificationType = this->getString(OS_Schedule_RuleFields::DateSpecificationType, true);
186 OS_ASSERT(dateSpecificationType);
187 if (istringEqual("DateRange", *dateSpecificationType)) {
188 boost::optional<int> endMonth = this->getInt(OS_Schedule_RuleFields::EndMonth, true);
189 OS_ASSERT(endMonth);
190 boost::optional<int> endDay = this->getInt(OS_Schedule_RuleFields::EndDay, true);
191 OS_ASSERT(endDay);
192 YearDescription yd = this->model().getUniqueModelObject<model::YearDescription>();
193 result = yd.makeDate(MonthOfYear(*endMonth), *endDay);
194 }
195
196 return result;
197 }
198
199 std::vector<openstudio::Date> ScheduleRule_Impl::specificDates() const {
200 YearDescription yd = this->model().getUniqueModelObject<model::YearDescription>();

Callers 2

containsDateMethod · 0.95
containsDatesMethod · 0.95

Calls 6

istringEqualFunction · 0.85
MonthOfYearClass · 0.70
getStringMethod · 0.45
getIntMethod · 0.45
modelMethod · 0.45
makeDateMethod · 0.45

Tested by

no test coverage detected