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::Beijing QuantLib::Bombay QuantLib::Bratislava QuantLib::Budapest QuantLib::Copenhagen QuantLib::Germany QuantLib::Helsinki QuantLib::HongKong QuantLib::Istanbul QuantLib::Italy QuantLib::Johannesburg QuantLib::JointCalendar QuantLib::NullCalendar QuantLib::Oslo QuantLib::Prague QuantLib::Riyadh QuantLib::Seoul QuantLib::Singapore QuantLib::Stockholm QuantLib::Sydney QuantLib::Taipei QuantLib::Taiwan QuantLib::TARGET QuantLib::Tokyo QuantLib::Toronto QuantLib::UnitedKingdom QuantLib::UnitedStates QuantLib::Warsaw QuantLib::Wellington QuantLib::Zurich

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.

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

Definition at line 86 of file calendar.hpp.


Public Types

typedef T_impl Impl

Public Member Functions

 Calendar ()
bool isNull () const
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
bool isBusinessDay (const Date &d) const
bool isEndOfMonth (const Date &d) const
bool isHoliday (const Date &d) const
std::string name () const
 Returns the name of the calendar.
void removeHoliday (const Date &)

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 &)
bool operator== (const Calendar &, const Calendar &)

Classes

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