| Home | Libraries | People | FAQ | More

## Class template counted_time_system

boost::date_time::counted_time_system — An unadjusted time system implementation.

## Synopsis

    // In header: <boost/date_time/time_system_counted.hpp>

    template<typename time_rep>
    class counted_time_system {
    public:
      // types
      typedef time_rep                                    time_rep_type;
      typedef time_rep_type::impl_type                    impl_type;
      typedef time_rep_type::time_duration_type           time_duration_type;
      typedef time_duration_type::fractional_seconds_type fractional_seconds_type;
      typedef time_rep_type::date_type                    date_type;
      typedef time_rep_type::date_duration_type           date_duration_type;

      // public static functions
      template<typename T> static BOOST_CXX14_CONSTEXPR void unused_var(const T &);
      static BOOST_CXX14_CONSTEXPR time_rep_type
      get_time_rep(const date_type &, const time_duration_type &,
                   date_time::dst_flags = not_dst);
      static BOOST_CXX14_CONSTEXPR time_rep_type get_time_rep(special_values);
      static BOOST_CXX14_CONSTEXPR date_type get_date(const time_rep_type &);
      static BOOST_CXX14_CONSTEXPR time_duration_type
      get_time_of_day(const time_rep_type &);
      static std::string zone_name(const time_rep_type &);
      static BOOST_CXX14_CONSTEXPR bool
      is_equal(const time_rep_type &, const time_rep_type &);
      static BOOST_CXX14_CONSTEXPR bool
      is_less(const time_rep_type &, const time_rep_type &);
      static BOOST_CXX14_CONSTEXPR time_rep_type
      add_days(const time_rep_type &, const date_duration_type &);
      static BOOST_CXX14_CONSTEXPR time_rep_type
      subtract_days(const time_rep_type &, const date_duration_type &);
      static BOOST_CXX14_CONSTEXPR time_rep_type
      subtract_time_duration(const time_rep_type &, const time_duration_type &);
      static BOOST_CXX14_CONSTEXPR time_rep_type
      add_time_duration(const time_rep_type &, time_duration_type);
      static BOOST_CXX14_CONSTEXPR time_duration_type
      subtract_times(const time_rep_type &, const time_rep_type &);
    };

## Description

### `counted_time_system` public static functions

1.     template<typename T> static BOOST_CXX14_CONSTEXPR void unused_var(const T &);

2.     static BOOST_CXX14_CONSTEXPR time_rep_type
       get_time_rep(const date_type & day, const time_duration_type & tod,
                    date_time::dst_flags dst = not_dst);

3.     static BOOST_CXX14_CONSTEXPR time_rep_type get_time_rep(special_values sv);

4.     static BOOST_CXX14_CONSTEXPR date_type get_date(const time_rep_type & val);

5.     static BOOST_CXX14_CONSTEXPR time_duration_type
       get_time_of_day(const time_rep_type & val);

6.     static std::string zone_name(const time_rep_type &);

7.     static BOOST_CXX14_CONSTEXPR bool
       is_equal(const time_rep_type & lhs, const time_rep_type & rhs);

8.     static BOOST_CXX14_CONSTEXPR bool
       is_less(const time_rep_type & lhs, const time_rep_type & rhs);

9.     static BOOST_CXX14_CONSTEXPR time_rep_type
       add_days(const time_rep_type & base, const date_duration_type & dd);

10.     static BOOST_CXX14_CONSTEXPR time_rep_type
        subtract_days(const time_rep_type & base, const date_duration_type & dd);

11.     static BOOST_CXX14_CONSTEXPR time_rep_type
        subtract_time_duration(const time_rep_type & base,
                               const time_duration_type & td);

12.     static BOOST_CXX14_CONSTEXPR time_rep_type
        add_time_duration(const time_rep_type & base, time_duration_type td);

13.     static BOOST_CXX14_CONSTEXPR time_duration_type
        subtract_times(const time_rep_type & lhs, const time_rep_type & rhs);