![]() QuantLib 0.3.11Getting startedReference manual |
Date Class Reference |
Public Member Functions | |
constructors | |
Date () | |
Default constructor returning a null date. | |
Date (BigInteger serialNumber) | |
Constructor taking a serial number as given by Applix or Excel. | |
Date (Day d, Month m, Year y) | |
More traditional constructor. | |
inspectors | |
Weekday | weekday () const |
Day | dayOfMonth () const |
Day | dayOfYear () const |
One-based (Jan 1st = 1). | |
Month | month () const |
Year | year () const |
BigInteger | serialNumber () const |
date algebra | |
Date & | operator+= (BigInteger days) |
increments date by the given number of days | |
Date & | operator+= (const Period &) |
increments date by the given period | |
Date & | operator-= (BigInteger days) |
decrement date by the given number of days | |
Date & | operator-= (const Period &) |
decrements date by the given period | |
Date & | operator++ () |
1-day pre-increment | |
Date | operator++ (int) |
1-day post-increment | |
Date & | operator-- () |
1-day pre-decrement | |
Date | operator-- (int) |
1-day post-decrement | |
Date | operator+ (BigInteger days) const |
returns a new date incremented by the given number of days | |
Date | operator+ (const Period &) const |
returns a new date incremented by the given period | |
Date | operator- (BigInteger days) const |
returns a new date decremented by the given number of days | |
Date | operator- (const Period &) const |
returns a new date decremented by the given period | |
Static Public Member Functions | |
static methods | |
static Date | todaysDate () |
today's date. | |
static Date | minDate () |
earliest allowed date | |
static Date | maxDate () |
latest allowed date | |
static bool | isLeap (Year y) |
whether the given year is a leap one | |
static Date | endOfMonth (const Date &d) |
last day of the month to which the given date belongs | |
static bool | isEOM (const Date &d) |
whether a date is the last day of its month | |
static Date | nextWeekday (const Date &d, Weekday) |
next given weekday following or equal to the given date | |
static Date | nthWeekday (Size n, Weekday, Month m, Year y) |
n-th given weekday in the given month and year | |
static bool | isIMMdate (const Date &d) |
whether or not the given date is an IMM date | |
static Date | nextIMMdate (const Date &d) |
next IMM date following (or equal to) the given date | |
Related Functions | |
(Note that these are not member functions.) | |
BigInteger | operator- (const Date &, const Date &) |
Difference in days between dates. | |
bool | operator== (const Date &, const Date &) |
bool | operator!= (const Date &, const Date &) |
bool | operator< (const Date &, const Date &) |
bool | operator<= (const Date &, const Date &) |
bool | operator> (const Date &, const Date &) |
bool | operator>= (const Date &, const Date &) |
std::ostream & | operator<< (std::ostream &, const Date &) |
|
next given weekday following or equal to the given date E.g., the Friday following January 15th, 20 (a Tuesday) was January 18th, 2002. |
|
n-th given weekday in the given month and year E.g., the 4th Thursday of March, 1998 was March 26th, 1998. |
|
next IMM date following (or equal to) the given date returns the 1st delivery date for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.
|
QuantLib.org![]() |
Hosted by![]() |
Documentation generated by![]() |