| Home | Libraries | People | FAQ | More

## 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 * get_universal_time() ;
    };

## 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() ;

   Get the local day as a date type.

2.     date_type::ymd_type local_day_ymd() ;

   Get the local day as a ymd_type.

3.     date_type::ymd_type universal_day_ymd() ;

   Get the current day in universal date as a ymd_type.

4.     date_type universal_day() ;

   Get the UTC day as a date type.

### `day_clock` private static functions

1.     ::std::tm * get_local_time() ;

2.     ::std::tm * get_universal_time() ;

| Copyright © 2001-2004 CrystalClear Software, Inc