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 day_clock

boost::date_time::day_clock — A clock providing day level services based on C time_t capabilities.

Synopsis

template<typename date_type> 
class day_clock {
public:
  // types
  typedef date_type::ymd_type ymd_type;

  // public static functions
  date_type local_day() ;
  date_type::ymd_type local_day_ymd() ;
  date_type::ymd_type universal_day_ymd() ;
  date_type universal_day() ;

  // private static functions
  ::std::tm * get_local_time(std::tm &) ;
  ::std::tm * get_universal_time(std::tm &) ;
};

Description

This clock uses Posix interfaces as its implementation and hence uses the timezone settings of the operating system. Incorrect user settings will result in incorrect results for the calls to local_day.

day_clock public static functions

  1. date_type local_day() ;
  2. date_type::ymd_type local_day_ymd() ;
  3. date_type::ymd_type universal_day_ymd() ;
  4. date_type universal_day() ;

day_clock private static functions

  1. ::std::tm * get_local_time(std::tm & result) ;
  2. ::std::tm * get_universal_time(std::tm & result) ;
Copyright © 2001-2005 CrystalClear Software, Inc

PrevUpHomeNext