Date and time calculations


Detailed Description

The concrete class QuantLib::Date implements the concept of date. Its functionalities include:

  • providing basic information such as weekday, day of the month, day of the year, month, and year;

  • comparing two dates to determine whether they are equal, or which one is the earlier or later, or the difference between them expressed in days;

  • incrementing or decrementing a date of a given number of days, or of a given period expressed in weeks, months, or years.


Modules

 Calendars
 Day counters

Classes

class  Calendar
 calendar class More...

class  Period
 Time period described by a number of a given time unit. More...

class  Date
 Concrete date class. More...

class  DayCounter
 day counter class More...


Typedefs

typedef Integer QuantLib::Day
 Day number.

typedef Integer QuantLib::Year
 Year number.


Enumerations

enum  QuantLib::BusinessDayConvention {
  QuantLib::Unadjusted, QuantLib::Preceding, QuantLib::ModifiedPreceding, QuantLib::Following,
  QuantLib::ModifiedFollowing, QuantLib::MonthEndReference
}
 Business Day conventions. More...

enum  QuantLib::Weekday {
  Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4,
  Thursday = 5, Friday = 6, Saturday = 7
}
enum  QuantLib::Month {
  January = 1, February = 2, March = 3, April = 4,
  May = 5, June = 6, July = 7, August = 8,
  September = 9, October = 10, November = 11, December = 12
}
 Month names.

enum  QuantLib::Frequency {
  QuantLib::Once = 0, QuantLib::Annual = 1, QuantLib::Semiannual = 2, QuantLib::Quarterly = 4,
  QuantLib::Bimonthly = 6, QuantLib::Monthly = 12
}
 Frequency of events. More...

enum  QuantLib::TimeUnit { Days = 0, Weeks = 1, Months = 2, Years = 3 }
 Units used to describe time periods.


Enumeration Type Documentation

enum BusinessDayConvention
 

Business Day conventions.

These conventions specify the algorithm used to adjust a date in case it is not a valid business day.

Enumeration values:
Unadjusted  Do not adjust.
Preceding  Choose the first business day before the given holiday.
ModifiedPreceding  Choose the first business day before the given holiday unless it belongs to a different month, in which case choose the first business day after the holiday.
Following  Choose the first business day after the given holiday.
ModifiedFollowing  Choose the first business day after the given holiday unless it belongs to a different month, in which case choose the first business day before the holiday.
MonthEndReference  Choose the first business day after the given holiday, if the original date falls on last business day of month result reverts to first business day before month-end

enum Weekday
 

Day's serial number MOD 7; WEEKDAY Excel function is the same except for Sunday = 7.

enum Frequency
 

Frequency of events.

Enumeration values:
Once  only once, e.g., a zero-coupon
Annual  once a year
Semiannual  twice a year
Quarterly  every third month
Bimonthly  every second month
Monthly  once a month


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen