Public Types | |
| enum | BDC { bdcNone, bdcModf, bdcNext, bdcPrev, bdcInvalid } |
Public Methods | |
| DateOperation (const std::string &description) | |
| std::string | toString () const |
| bool | empty () const |
| bool | emptyDelay () const |
| bool | emptyBdc () const |
| bool | valid () const |
| void | parse (const std::string &description) |
| void | clear () |
| void | neg () |
| void | invalidates () |
| int | days () const |
| bool | workDays () const |
| int | months () const |
| bool | monthEndToEnd () const |
| int | years () const |
| bool | yearEndToEnd () const |
| BDC | bdc () const |
| PHolidayRepository | holidays () const |
| void | days (int days) |
| void | workDays (bool workDays) |
| void | months (int months) |
| void | monthEndToEnd (bool endToEnd) |
| void | years (int years) |
| void | yearEndToEnd (bool endToEnd) |
| void | bdc (BDC bdc) |
| void | holidays (const std::string &holidaysName) |
| void | holidays (PHolidayRepository holidays) |
| void | apply (Date &date, int times=1) const |
| void | applyDelay (Date &date, int times=1) const |
| void | applyBdc (Date &date) const |
| double | fraction () const |
Static Public Methods | |
| void | addWorkDays (Date &date, int days, const HolidayRepository &holidays) |
| void | addWorkDayModified (Date &date, const HolidayRepository &holidays) |
A date operation is a addition or substraction of any number of days to a date, with various options related to business days handling. It is usefull to financial and trading applications in order to compute dates schedules (payment, fixing, ...) which conform to market conventions.
The Format for a textual date operation description is "[delay][,][adjustment][:holidays]" where delay can be one of:
The holidays is the name of a holidays repository which must have been registered beforehand in the global holidays manager. For instance, you can define the date operation "2bd:FR" which means "adds two business days, using the 'FR' holidays repository to decide which days are business days".
1.3-rc2