scale_with_holidays(const ptime& tm, const ptime& start, long frequency=1, time_zone_const_ptr tz=nullptr, holidays_const_ptr hol=nullptr) : _frequency(frequency), _holidays(hol) { if(tm.is_special()) throw std::logic_error("the time to point to cannot be a special value"); if(_frequency <= 0) throw std::logic_error("frequency must be positive"); if(start.is_special()) _base.reset(detail::helper<BaseScale>::create(tm, tm, tz)); else _base.reset(detail::helper<BaseScale>::create(tm, start, tz)); back_to_non_holiday(); update_position(); }
// // // constructors // // // explicit scale_with_holidays(const ptime& start, long frequency=1, time_zone_const_ptr tz=nullptr, holidays_const_ptr hol=nullptr) : _frequency(frequency), _holidays(hol), _position(0) { if(start.is_special()) throw std::logic_error("the start time cannot be a special value"); if(_frequency <= 0) throw std::logic_error("frequency must be positive"); _base.reset(detail::helper<BaseScale>::create(start, tz)); back_to_non_holiday(); }