| 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>(); |
no test coverage detected