Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template date_facet

boost::date_time::date_facet

Synopsis

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

template<typename date_type, typename CharT, 
         typename OutItrT = CharT, CharT> > > 
class date_facet : public  {
public:
  // types
  typedef                              ;                
  typedef                           ;             
  typedef                                   ;                     
  typedef                                 ;                   
  typedef boost::date_time::period<  ;                  
  typedef CharT >                           ;                  
  typedef CharT                                                ;                    
  typedef boost::date_time::period_formatter< CharT >          ;        
  typedef boost::date_time::special_values_formatter< CharT >  ;
  typedef CharT > >            ;        
  typedef date_generator_formatter< CharT >         ;      
  typedef partial_date<                             ;            
  typedef nth_kday_of_month<                        ;                
  typedef first_kday_of_month<                      ;              
  typedef last_kday_of_month<                       ;               
  typedef first_kday_after<                         ;              
  typedef first_kday_before<                        ;             

  // construct/copy/destruct
  (:: = );
  (const , const , 
                      :: = );
  (const , 
                      period_formatter_type = period_formatter_type(), 
                      special_values_formatter_type = special_values_formatter_type(), 
                      date_gen_formatter_type = date_gen_formatter_type(), 
                      :: = );

  // public member functions
   (void) ;
  void (const const);
  void ();
  void ();
  void (const const);
  void (const const);
  void (period_formatter_type);
  void (const special_values_formatter_type &);
  void (const );
  void (const );
  void (const );
  void (const );
  void (const , 
                               typename  = );
  OutItrT (OutItrT, , , const ) ;
  OutItrT (OutItrT, , , const ) ;
  OutItrT (OutItrT, , , const ) ;
  OutItrT (OutItrT, , , const ) ;
  OutItrT (OutItrT, , , const ) ;
  OutItrT (OutItrT, , , const period_type &) ;
  OutItrT (OutItrT, , , const partial_date_type &) ;
  OutItrT (OutItrT, , , const nth_kday_type &) ;
  OutItrT (OutItrT, , , const first_kday_type &) ;
  OutItrT (OutItrT, , , const last_kday_type &) ;
  OutItrT (OutItrT, , , const kday_before_type &) ;
  OutItrT (OutItrT, , , const kday_after_type &) ;

  // protected member functions
  OutItrT 
  (OutItrT, , , 
                 const ) ;
  OutItrT 
  (OutItrT, , , const tm &, ) ;

  // public data members
  static const  long_weekday_format;
  static const  short_weekday_format;
  static const  long_month_format;
  static const  short_month_format;
  static const  default_period_separator;
  static const  standard_format_specifier;
  static const  iso_format_specifier;
  static const  iso_format_extended_specifier;
  static const  default_date_format;
  static  id;
};

Description

Class that provides format based I/O facet for date types.

This class allows the formatting of dates by using format string. Format strings are:

  • A => long_weekday_format - Full name Ex: Tuesday

  • a => short_weekday_format - Three letter abbreviation Ex: Tue

  • B => long_month_format - Full name Ex: October

  • b => short_month_format - Three letter abbreviation Ex: Oct

  • x => standard_format_specifier - defined by the locale

  • Y-b-d => default_date_format - YYYY-Mon-dd

Default month format == b Default weekday format == a

date_facet public construct/copy/destruct

  1. (:: a_ref = );
  2. (const  format_str, 
                        const  short_names, 
                        :: ref_count = );
  3. (const  format_str, 
                        period_formatter_type per_formatter = period_formatter_type(), 
                        special_values_formatter_type sv_formatter = special_values_formatter_type(), 
                        date_gen_formatter_type dg_formatter = date_gen_formatter_type(), 
                        :: ref_count = );

date_facet public member functions

  1.  (void) ;
  2. void (const const format_str);
  3. void ();
  4. void ();
  5. void (const const format_str);
  6. void (const const format_str);
  7. void (period_formatter_type per_formatter);
  8. void (const special_values_formatter_type & svf);
  9. void (const  short_names);
  10. void (const  long_names);
  11. void (const  short_names);
  12. void (const  long_names);
  13. void (const  new_strings, 
                                 typename  beg_pos = );
  14. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const  d) ;
  15. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const  dd) ;
  16. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const  m) ;
  17. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const  day) ;
    puts the day of month
  18. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const  dow) ;
  19. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const period_type & p) ;
  20. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const partial_date_type & pd) ;
  21. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const nth_kday_type & nkd) ;
  22. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const first_kday_type & fkd) ;
  23. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const last_kday_type & lkd) ;
  24. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const kday_before_type & fkb) ;
  25. OutItrT (OutItrT next,  a_ios,  fill_char, 
                const kday_after_type & fka) ;

date_facet protected member functions

  1. OutItrT 
    (OutItrT next, , , 
                   const  sv) ;
  2. OutItrT 
    (OutItrT next,  a_ios,  fill_char, 
              const tm & tm_value,  a_format) ;

PrevUpHomeNext