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

Class template months_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 months_duration

boost::date_time::months_duration — additional duration type that represents a logical month

Synopsis

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

Description

Логический месяц позволяет такие вещи, как: «дата (2002, Mar,2) + месяцы (2) - >2002-May2». Если дата является последним днем месяца, результат также будет последним днем месяца.

months_duration public construct/copy/destruct

  1. <
    months_duration(int_repnum);
    >
  2. <
    months_duration(special_valuessv);
    >

months_duration public member functions

  1. <
    int_repnumber_of_months()const;
    >
  2. <
    duration_typeget_neg_offset(constdate_type&d)const;
    >Отрицательная продолжительность
  3. <
    duration_typeget_offset(constdate_type&d)const;
    >
  4. <
    booloperator==(constmonths_type&rhs)const;
    >
  5. <
    booloperator!=(constmonths_type&rhs)const;
    >
  6. <
    months_typeoperator+(constmonths_type&rhs)const;
    >
  7. <
    months_type&operator+=(constmonths_type&rhs);
    >
  8. <
    months_typeoperator-(constmonths_type&rhs)const;
    >
  9. <
    months_type&operator-=(constmonths_type&rhs);
    >
  10. <
    months_typeoperator*(constint_typerhs)const;
    >
  11. <
    months_type&operator*=(constint_typerhs);
    >
  12. <
    months_typeoperator/(constint_typerhs)const;
    >
  13. <
    months_type&operator/=(constint_typerhs);
    >
  14. <
    months_typeoperator+(constyears_type&y)const;
    >
  15. <
    months_type&operator+=(constyears_type&y);
    >
  16. <
    months_typeoperator-(constyears_type&y)const;
    >
  17. <
    months_type&operator-=(constyears_type&y);
    >

PrevUpHomeNext

Статья Class template months_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-07-04 18:40:33/0.0060160160064697/0