Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::Calendar Class Reference

#include <calendar.hpp>

Inheritance diagram for QuantLib::Calendar:

QuantLib::Bridge< T, T_impl > QuantLib::Argentina QuantLib::Australia QuantLib::Brazil QuantLib::Canada QuantLib::China QuantLib::CzechRepublic QuantLib::Denmark QuantLib::Finland QuantLib::Germany QuantLib::HongKong QuantLib::Hungary QuantLib::Iceland QuantLib::India QuantLib::Indonesia QuantLib::Italy QuantLib::Japan QuantLib::JointCalendar QuantLib::Mexico QuantLib::NewZealand QuantLib::Norway QuantLib::NullCalendar QuantLib::Poland QuantLib::SaudiArabia QuantLib::Singapore QuantLib::Slovakia QuantLib::SouthAfrica QuantLib::SouthKorea QuantLib::Sweden QuantLib::Switzerland QuantLib::Taiwan QuantLib::TARGET QuantLib::Turkey QuantLib::Ukraine QuantLib::UnitedKingdom QuantLib::UnitedStates

List of all members.

Detailed Description

calendar class

This class provides methods for determining whether a date is a business day or a holiday for a given market, and for incrementing/decrementing a date of a given number of business days.

The Bridge pattern is used to provide the base behavior of the calendar, namely, to determine whether a date is a business day.

A calendar should be defined for specific exchange holiday schedule or for general country holiday schedule. Legacy city holiday schedule calendars will be moved to the exchange/country convention.

the methods for adding and removing holidays are tested by inspecting the calendar before and after their invocation.

Definition at line 103 of file calendar.hpp.

Calendar interface

void addHoliday (const Date &)
Date adjust (const Date &, BusinessDayConvention convention=Following, const Date &origin=Date()) const
Date advance (const Date &date, const Period &period, BusinessDayConvention convention=Following) const
Date advance (const Date &, Integer n, TimeUnit unit, BusinessDayConvention convention=Following) const
Date endOfMonth (const Date &d) const
 last business day of the month to which the given date belongs
bool isBusinessDay (const Date &d) const
bool isEndOfMonth (const Date &d) const
bool isHoliday (const Date &d) const
bool isWeekend (Weekday w) const
std::string name () const
 Returns the name of the calendar.
void removeHoliday (const Date &)
static std::vector< DateholidayList (const Calendar &calendar, const Date &from, const Date &to, bool includeWeekEnds=false)
 Returns the holidays between two dates.

Public Types

typedef T_impl Impl

Public Member Functions

 Calendar ()
bool empty () const
bool isNull () const

Protected Member Functions

 Calendar (const boost::shared_ptr< CalendarImpl > &impl)

Protected Attributes

boost::shared_ptr< Impl > impl_

Related Functions

(Note that these are not member functions.)

bool operator!= (const Calendar &, const Calendar &)
std::ostream & operator<< (std::ostream &, const Calendar &)
bool operator== (const Calendar &, const Calendar &)


class  OrthodoxImpl
 partial calendar implementation More...
class  WesternImpl
 partial calendar implementation More...

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index