Date and time calculations
Detailed Description
The concrete classQuantLib::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 | Date |
Concrete date class. More... | |
struct | DateGeneration |
Date-generation rule. More... | |
class | DayCounter |
day counter class More... | |
class | Period |
Typedefs | |
typedef Integer | Day |
Day number. | |
typedef Integer | Year |
Year number. | |
Enumerations | |
enum | BusinessDayConvention { Following, ModifiedFollowing, Preceding, ModifiedPreceding, Unadjusted } |
Business Day conventions. More... | |
enum | 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, Jan = 1, Feb = 2, Mar = 3, Apr = 4, Jun = 6, Jul = 7, Aug = 8, Sep = 9, Oct = 10, Nov = 11, Dec = 12 } |
Month names. More... | |
enum | Frequency { NoFrequency = -1, Once = 0, Annual = 1, Semiannual = 2, EveryFourthMonth = 3, Quarterly = 4, Bimonthly = 6, Monthly = 12, Biweekly = 26, Weekly = 52, Daily = 365 } |
Frequency of events. More... | |
enum | TimeUnit { Days, Weeks, Months, Years } |
Units used to describe time periods. More... | |
enum | Weekday { Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = 4, Thursday = 5, Friday = 6, Saturday = 7, Sun = 1, Mon = 2, Tue = 3, Wed = 4, Thu = 5, Fri = 6, Sat = 7 } |
Typedef Documentation
typedef Integer Day |
Day number.
typedef Integer Year |
Year number.
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.
- Enumerator:
enum Month |
Month names.
enum Frequency |
Frequency of events.
enum TimeUnit |
Units used to describe time periods.
enum Weekday |
Day's serial number MOD 7; WEEKDAY Excel function is the same except for Sunday = 7.