Logo Search packages:      
Sourcecode: quantlib version File versions

date.hpp File Reference


Detailed Description

date- and time-related classes, typedefs and enumerations

Definition in file date.hpp.

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

Go to the source code of this file.

Namespaces

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

Classes

class  QuantLib::Date
 Concrete date class. More...
class  QuantLib::DateFormatter
 Formats dates for output. More...
class  QuantLib::FrequencyFormatter
 Formats frequency for output. More...
struct  QuantLib::detail::iso_date_holder
struct  QuantLib::detail::long_date_holder
struct  QuantLib::detail::long_period_holder
struct  QuantLib::detail::long_weekday_holder
class  QuantLib::Period
 Time period described by a number of a given time unit. More...
struct  QuantLib::detail::short_date_holder
struct  QuantLib::detail::short_period_holder
struct  QuantLib::detail::short_weekday_holder
struct  QuantLib::detail::shortest_weekday_holder
class  QuantLib::WeekdayFormatter
 Formats weekday for output. More...

Typedefs

typedef Integer QuantLib::Day
 Day number.
typedef Integer QuantLib::Year
 Year number.

Enumerations

enum  Frequency {
  QuantLib::NoFrequency = -1, QuantLib::Once = 0, QuantLib::Annual = 1, QuantLib::Semiannual = 2,
  QuantLib::EveryFourthMonth = 3, QuantLib::Quarterly = 4, QuantLib::Bimonthly = 6, QuantLib::Monthly = 12
}
 Frequency of events. More...
enum  IMMMonth { H = 3, M = 6, U = 9, Z = 12 }
 Main cycle of the International Money Market (a.k.a. IMM) Months. 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  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
}

Functions

detail::iso_date_holder QuantLib::io::iso_date (const Date &)
 output dates in ISO format (yyyy-mm-dd)
detail::long_date_holder QuantLib::io::long_date (const Date &)
 output dates in long format (Month ddth, yyyy)
detail::long_period_holder QuantLib::io::long_period (const Period &)
 output periods in long format (e.g. "2 weeks")
detail::long_weekday_holder QuantLib::io::long_weekday (Weekday)
 output weekdays in long format
bool QuantLib::operator!= (const Date &d1, const Date &d2)
bool QuantLib::operator!= (const Period &p1, const Period &p2)
Period QuantLib::operator* (TimeUnit units, Integer n)
Period QuantLib::operator* (Integer n, TimeUnit units)
BigInteger QuantLib::operator- (const Date &d1, const Date &d2)
bool QuantLib::operator< (const Date &d1, const Date &d2)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const iso_date_holder &holder)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const long_date_holder &holder)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const short_date_holder &holder)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const short_period_holder &holder)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const long_period_holder &holder)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const shortest_weekday_holder &holder)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const short_weekday_holder &holder)
std::ostream & QuantLib::detail::operator<< (std::ostream &out, const long_weekday_holder &holder)
bool QuantLib::operator<= (const Date &d1, const Date &d2)
bool QuantLib::operator<= (const Period &p1, const Period &p2)
bool QuantLib::operator== (const Date &d1, const Date &d2)
bool QuantLib::operator== (const Period &p1, const Period &p2)
bool QuantLib::operator> (const Date &d1, const Date &d2)
bool QuantLib::operator> (const Period &p1, const Period &p2)
bool QuantLib::operator>= (const Date &d1, const Date &d2)
bool QuantLib::operator>= (const Period &p1, const Period &p2)
detail::short_date_holder QuantLib::io::short_date (const Date &)
 output dates in short format (mm/dd/yyyy)
detail::short_period_holder QuantLib::io::short_period (const Period &)
 output periods in short format (e.g. "2w")
detail::short_weekday_holder QuantLib::io::short_weekday (Weekday)
 output weekdays in short format (three letters)
detail::shortest_weekday_holder QuantLib::io::shortest_weekday (Weekday)
 output weekdays in shortest format (two letters)


Generated by  Doxygen 1.6.0   Back to index