Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Class template years_duration

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Library Reference

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

PrevUpHomeNext

Class template years_duration

boost::date_time::years_duration — additional duration type that represents a logical year

Synopsis

// In header: <boost/date_time/date_duration_types.hpp>
template<typename t> 
class years_duration {
public:
  // construct/copy/destruct
  years_duration(int_rep);
  years_duration(special_values);
  // public member functions
  int_rep number_of_years() const;
  duration_type get_neg_offset(const date_type &) const;
  duration_type get_offset(const date_type &) const;
  bool operator==(const years_type &) const;
  bool operator!=(const years_type &) const;
  years_type operator+(const years_type &) const;
  years_type & operator+=(const years_type &);
  years_type operator-(const years_type &) const;
  years_type & operator-=(const years_type &);
  years_type operator*(const int_type) const;
  years_type & operator*=(const int_type);
  years_type operator/(const int_type) const;
  years_type & operator/=(const int_type);
  months_type operator+(const months_type &) const;
  months_type operator-(const months_type &) const;
};

Description

Логический год позволяет делать такие вещи, как «дата (2002, Мар,2) + годы (2) -> 2004-Мар-2». Если дата является последним днем месяца, результатом будет также последний день месяца (т.е. дата (2001-Feb-28) + годы (3) -> 2004-Feb-29).

years_duration public construct/copy/destruct

  1. years_duration(int_rep num);
  2. years_duration(special_values sv);

years_duration public member functions

  1. int_rep номер_of_years() const;
  2. duration_type get_neg_offset(const date_type & d) const;
    возврат отрицательной продолжительности
  3. duration_type get_offset(const date_type & d) const;
  4. bool оператор==(const лет_type & rhs) const;
  5. bool оператор!=(const лет_type & rhs) const;
  6. years_type оператор+(const лет_type & rhs) const;
  7. years_type & оператор+=(const лет_type & rhs);
  8. years_type оператор-(const лет_type & rhs) const;
  9. years_type & оператор-=(const лет_type & rhs);
  10. years_type оператор*(const int_type rhs) const;
  11. years_type & оператор*=(constint_type rhs);
  12. years_type оператор/(const int_type rhs) const;
  13. years_type & оператор/=(const int_type rhs);
  14. месяцев_типа оператор+(const месяцев_type & m) const;
  15. месяцев_типа оператор-(const месяцев_type & m) const;

PrevUpHomeNext

Статья Class template years_duration раздела The Boost C++ Libraries BoostBook Documentation Subset Library Reference может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Library Reference ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 01:55:40/0.0036749839782715/0