Valuation library for inflation-indexed bonds
Public Member Functions | Public Attributes | List of all members
AndrewKalotayAssociates::Common::TimeDifference Struct Reference

Public Member Functions

 TimeDifference (long input_periods=IntMin(), CalendarUnits::type input_units=CalendarUnits::unknown)
 Default constructor initializes to invalid values.
bool operator== (const TimeDifference &rhs) const
bool operator!= (const TimeDifference &rhs) const
long months () const
 Converts to number of months as an integer. Use only if units are either years or months.
double years () const
bool operator< (const TimeDifference &rhs) const
bool operator> (const TimeDifference &rhs) const
bool operator<= (const TimeDifference &rhs) const
bool operator>= (const TimeDifference &rhs) const

Public Attributes

long periods
 Number of time periods.
CalendarUnits::type units
 Units of time.

Member Function Documentation

◆ years()

double AndrewKalotayAssociates::Common::TimeDifference::years ( ) const

Converts to number of years as an integer. Use only if units are years or months where number of periods is a multiple of 12

The documentation for this struct was generated from the following file: