Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template time_facet

boost::date_time::time_facet

Synopsis

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

template<typename time_type, typename CharT, 
         typename OutItrT = CharT, CharT> > > 
class time_facet : public  {
public:
  // types
  typedef                                                           ;                    
  typedef                                                  ;           
  typedef boost::date_time::period<                      ;                  
  typedef boost::date_time::date_facet< typename CharT, OutItrT > ;                    
  typedef                                                         ;                  
  typedef                                                           ;                    
  typedef                                               ;        
  typedef                                       ;
  typedef                                             ;      

  // construct/copy/destruct
  (:: = );
  (const ,  = , 
                      const  = , 
                       = , :: = );

  // public member functions
   (void) ;
  void (const const);
  void ();
  void ();
  OutItrT (OutItrT, , , const ) ;
  OutItrT (OutItrT, , , const ) ;
  OutItrT (OutItrT, , , const period_type &) ;

  // protected static functions
   
  (const , bool);
   (const , int = );
  template<typename IntT>  (IntT, int = );

  // public data members
  static const  fractional_seconds_format;
  static const  fractional_seconds_or_none_format;
  static const  seconds_with_fractional_seconds_format;
  static const  seconds_format;
  static const  hours_format;
  static const  unrestricted_hours_format;
  static const  standard_format;
  static const  zone_abbrev_format;
  static const  zone_name_format;
  static const  zone_iso_format;
  static const  zone_iso_extended_format;
  static const  posix_zone_string_format;
  static const  duration_seperator;
  static const  duration_sign_always;
  static const  duration_sign_negative_only;
  static const  negative_sign;
  static const  positive_sign;
  static const  iso_time_format_specifier;
  static const  iso_time_format_extended_specifier;
  static const  default_time_format;
  static const  default_time_duration_format;
  static  id;
};

Description

Facet used for format-based output of time types This class provides for the use of format strings to output times. In addition to the flags for formatting date elements, the following are the allowed format flags:

  • x X => default format - enables addition of more flags to default (ie. "%x %X %z")

  • f => fractional seconds ".123456"

  • F => fractional seconds or none: like frac sec but empty if frac sec == 0

  • s => seconds w/ fractional sec "02.123" (this is the same as "%S%f) - %S => seconds "02" - %z => abbreviated time zone "EDT" - %Z => full time zone name "Eastern Daylight Time"

time_facet public construct/copy/destruct

  1. (:: ref_arg = );
    sets default formats for ptime, local_date_time, and time_duration
  2. (const  format_arg, 
                         period_formatter_arg = , 
                        const  special_value_formatter = , 
                         dg_formatter = , 
                        :: ref_arg = );
    Construct the facet with an explicitly specified format.

time_facet public member functions

  1.  (void) ;
  2. void (const const format);
    Changes format for time_duration.
  3. void ();
  4. void ();
  5. OutItrT (OutItrT next_arg,  ios_arg,  fill_arg, 
                const  time_arg) ;
  6. OutItrT (OutItrT next_arg,  ios_arg,  fill_arg, 
                const  time_dur_arg) ;
    put function for time_duration
  7. OutItrT (OutItrT next,  ios_arg,  fill, 
                const period_type & p) ;

time_facet protected static functions

  1.  
    (const  time_arg, 
                                 bool null_when_zero);
  2.  
    (const  time_arg, int width = );
  3. template<typename IntT> 
       (IntT val, int width = );

PrevUpHomeNext