Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Class date_duration

boost::gregorian::date_duration — Durations in days for gregorian system.

Synopsis

// In header: <boost/date_time/gregorian/greg_duration.hpp>


class date_duration {
public:
  // types
  typedef base_type::duration_rep duration_rep;

  // construct/copy/destruct
  date_duration(duration_rep = 0);
  date_duration(date_time::special_values);
  date_duration(const date_duration &);
  date_duration(const base_type &);

  // public member functions
  bool operator==(const date_duration &) const;
  bool operator!=(const date_duration &) const;
  bool operator<(const date_duration &) const;
  bool operator>(const date_duration &) const;
  bool operator<=(const date_duration &) const;
  bool operator>=(const date_duration &) const;
  date_duration & operator-=(const date_duration &) ;
  date_duration & operator+=(const date_duration &) ;
  date_duration operator-() const;
  date_duration & operator/=(int) ;

  // public static functions
  static date_duration unit() ;
};

Description

date_duration public construct/copy/destruct

  1. date_duration(duration_rep day_count = 0);
  2. date_duration(date_time::special_values sv);
  3. date_duration(const date_duration & other);
  4. date_duration(const base_type & other);

date_duration public member functions

  1. bool operator==(const date_duration & rhs) const;
  2. bool operator!=(const date_duration & rhs) const;
  3. bool operator<(const date_duration & rhs) const;
  4. bool operator>(const date_duration & rhs) const;
  5. bool operator<=(const date_duration & rhs) const;
  6. bool operator>=(const date_duration & rhs) const;
  7. date_duration & operator-=(const date_duration & rhs) ;
  8. date_duration & operator+=(const date_duration & rhs) ;
  9. date_duration operator-() const;
  10. date_duration & operator/=(int divisor) ;

date_duration public static functions

  1. static date_duration unit() ;

PrevUpHomeNext