24#ifndef quantlib_date_interval_hpp
25#define quantlib_date_interval_hpp
46 "end date must be >= start date");
52 bool includeFirst =
true,
53 bool includeLast =
true)
const {
58 if (includeLast && !(date <=
endDate_))
77 return !(*
this == rhs);
Date interval described by a number of a given time unit.
const Date & endDate() const
DateInterval intersection(const DateInterval &di) const
bool isDateBetween(Date date, bool includeFirst=true, bool includeLast=true) const
bool operator!=(const DateInterval &rhs) const
bool operator==(const DateInterval &rhs) const
const Date & startDate() const
DateInterval(const Date &startDate, const Date &endDate)
friend std::ostream & operator<<(std::ostream &, const DateInterval &)
date- and time-related classes, typedefs and enumerations
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified