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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Class template dst_calc_engine

boost::date_time::dst_calc_engine — Compile-time configurable daylight savings time calculation engine.

Synopsis

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

template<typename date_type, typename time_duration_type, typename dst_traits> 
class dst_calc_engine {
public:
  // types
  typedef date_type::year_type                            year_type;    
  typedef date_type::calendar_type                        calendar_type;
  typedef dst_calculator< date_type, time_duration_type > dstcalc;      

  // public static functions
  static time_is_dst_result 
  local_is_dst(const date_type &, const time_duration_type &) ;
  static bool is_dst_boundary_day(date_type) ;
  static time_duration_type dst_offset() ;
  static date_type local_dst_start_day(year_type) ;
  static date_type local_dst_end_day(year_type) ;
};

Description

dst_calc_engine public static functions

  1. static time_is_dst_result 
    local_is_dst(const date_type & d, const time_duration_type & td) ;
    Calculates if the given local time is dst or not.

    Determines if the time is really in DST or not. Also checks for invalid and ambiguous.

  2. static bool is_dst_boundary_day(date_type d) ;
  3. static time_duration_type dst_offset() ;
    The time of day for the dst transition (eg: typically 01:00:00 or 02:00:00).
  4. static date_type local_dst_start_day(year_type year) ;
  5. static date_type local_dst_end_day(year_type year) ;

PrevUpHomeNext