Re: Basic Question on Quantlib, Date and Calendar Classes

Posted by Luigi Ballabio-2 on
URL: http://quantlib.414.s1.nabble.com/Basic-Question-on-Quantlib-Date-and-Calendar-Classes-tp3426p3427.html

On 2004.12.03 13:13, ambarish vaidya wrote:
> Hi All,

Welcome on the list,

> I am starting to work with Quantlib. I compiled the libraries with Boost
> and am trying to play with Calendar/Date class. My first query is, is
> there any other documentation apart from the one provided with the
> library.

Not at this time. However, you might want to look at the sources for the  
test-suite to see examples of class usage. The Examples directory might be  
another place to look into.


> I am trying to use Calendar/Date class as mentioned. Do I have
> to implement the isHoliday() method? I am not implementing any interface  
> at all? How do I access this method.

There are a number of calendars in the library which implement the  
interface (see the ql/Calendars folder.) You can use instances of those  
directly (see e.g., test-suite/calendars.cpp.)

You'd be concerned with implementing the interface only if you were to add  
a new calendar to the library (and in fact there's no Indian calendar  
included, so you might be a handy fellow to have around.) In that case, you  
can define a new class by cloning the source for some existing calendar and  
tweaking it until it returns the desired holidays.

Hope this helps,
        Luigi