ql/period.hpp File Reference


Detailed Description

period- and frequency-related classes and enumerations

#include <ql/errors.hpp>
#include <ql/types.hpp>
#include <ostream>

Include dependency graph for period.hpp:


Namespaces

namespace  QuantLib
namespace  QuantLib::detail
namespace  QuantLib::io

Classes

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

Enumerations

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.

Functions

std::ostream & operator<< (std::ostream &, const long_period_holder &)
std::ostream & operator<< (std::ostream &, const short_period_holder &)
detail::long_period_holder long_period (const Period &)
 output periods in long format (e.g. "2 weeks")
detail::short_period_holder short_period (const Period &)
 output periods in short format (e.g. "2w")
Period operator * (Integer n, TimeUnit units)
Period operator * (TimeUnit units, Integer n)
Period operator- (const Period &p)
Period operator * (Integer n, const Period &p)
Period operator * (const Period &p, Integer n)
bool operator== (const Period &p1, const Period &p2)
bool operator!= (const Period &p1, const Period &p2)
bool operator> (const Period &p1, const Period &p2)
bool operator<= (const Period &p1, const Period &p2)
bool operator>= (const Period &p1, const Period &p2)