Class template date_facet Boost , The Boost C++ Libraries BoostBook Documentation Subset , Library Reference
Class template date_facet
boost::date_time::date_facet
Synopsis template < typename date_type, typename CharT,
typename OutItrT = std :: ostreambuf_iterator < CharT , std :: char_traits < CharT > > >
class date_facet : public facet {
public :
typedef date_type :: duration_type duration_type ;
typedef date_type :: day_of_week_type day_of_week_type ;
typedef date_type :: day_type day_type ;
typedef date_type :: month_type month_type ;
typedef boost::date_time::period < date_type , duration_type > period_type ;
typedef std :: basic_string < CharT > string_type ;
typedef CharT char_type ;
typedef boost::date_time::period_formatter < CharT > period_formatter_type ;
typedef boost::date_time::special_values_formatter < CharT > special_values_formatter_type ;
typedef std :: vector < std :: basic_string < CharT > > input_collection_type ;
typedef date_generator_formatter < date_type , CharT > date_gen_formatter_type ;
typedef partial_date < date_type > partial_date_type ;
typedef nth_kday_of_month < date_type > nth_kday_type ;
typedef first_kday_of_month < date_type > first_kday_type ;
typedef last_kday_of_month < date_type > last_kday_type ;
typedef first_kday_after < date_type > kday_after_type ;
typedef first_kday_before < date_type > kday_before_type ;
explicit date_facet ( :: size_t = 0 ) ;
explicit date_facet ( const char_type * , const input_collection_type & ,
:: size_t = 0 ) ;
explicit date_facet ( const char_type * ,
period_formatter_type = period_formatter_type ( ) ,
special_values_formatter_type = special_values_formatter_type ( ) ,
date_gen_formatter_type = date_gen_formatter_type ( ) ,
:: size_t = 0 ) ;
std :: locale :: id & __get_id ( void ) const ;
void format ( const char_type * const ) ;
virtual void set_iso_format ( ) ;
virtual void set_iso_extended_format ( ) ;
void month_format ( const char_type * const ) ;
void weekday_format ( const char_type * const ) ;
void period_formatter ( period_formatter_type ) ;
void special_values_formatter ( const special_values_formatter_type & ) ;
void short_weekday_names ( const input_collection_type & ) ;
void long_weekday_names ( const input_collection_type & ) ;
void short_month_names ( const input_collection_type & ) ;
void long_month_names ( const input_collection_type & ) ;
void date_gen_phrase_strings ( const input_collection_type & ,
typename date_gen_formatter_type :: phrase_elements = date_gen_formatter_type :: first ) ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const date_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const duration_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const month_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const day_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const day_of_week_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const period_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const partial_date_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const nth_kday_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const first_kday_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const last_kday_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const kday_before_type & ) const ;
OutItrT put ( OutItrT , std :: ios_base & , char_type , const kday_after_type & ) const ;
virtual OutItrT
do_put_special ( OutItrT , std :: ios_base & , char_type ,
const boost :: date_time :: special_values ) const ;
virtual OutItrT
do_put_tm ( OutItrT , std :: ios_base & , char_type , const tm & , string_type ) const ;
static const char_type long_weekday_format ;
static const char_type short_weekday_format ;
static const char_type long_month_format ;
static const char_type short_month_format ;
static const char_type default_period_separator ;
static const char_type standard_format_specifier ;
static const char_type iso_format_specifier ;
static const char_type iso_format_extended_specifier ;
static const char_type default_date_format ;
static std :: locale :: id id ;
} ; Description Класс, который предоставляет формат на основе I/O для типов дат.
Этот класс позволяет форматировать даты с помощью строки формата. Форматными строками являются:
A =>long_weekday_format - Полное имя Ex: Tuesday
a =>short_weekday_format — аббревиатура из трех букв Ex: Tue
B =>long_month_format - Полное имя Ex: October
b =>short_month_format — аббревиатура из трех букв Ex: Oct
x =>standard_format_specifier — определяется локально
Y-b-d =>default_date_format - YYYY-Mon-dd
Формат месяца по умолчанию == b Формат дня недели по умолчанию ==
date_facet
public
construct/copy/destructdate_facet
public member functionsstd :: locale :: id & __get_id void const ; void format const char_type * const format_str; виртуальный пустота set_iso_format ; виртуальный пустота set_iso_extended_format ; void month_format const char_type * const format_str; void weekday_format const char_type * const format_str; void period_formatter period_formatter_type per_formatter] ; void special_values_formatter const special_values_formatter_type & svf; void short_weekday_names const input_collection_type & short_names; void long_weekday_names const input_collection_type & long_names; void short_month_names const input_collection_type & short_names; void long_month_names const input_collection_type & long_names; void date_gen_phrase_strings const input_collection_type & new_strings, typename date_gen_formatter_type :: phrase_elements beg_pos= date_gen_formatter_type first ; OutItrT поставить OutItrT следующим, std :: ios_base & a_ios, char_type fill_char, const & d constOutItrT положить OutItrT следующая, std :: ios_base & a_ios, char_type fill_char, const & dd constOutItrT положить OutItrT std :: ios_base & aios& aios, char_type fill_char, const month_type & m] const ; OutItrT положить OutItrT следующим, std :: ios_base & aios& a_ios, char_type fill_char, const & const ; ставит день месяцаOutItrT положить OutItrT следующая, std ios_base & aios& a_ios, char_type fill_char, const day_of_week_type& dow const; OutItrT поставить OutItrT следующим, std :: ios_base & a_ios, char_type fill_char, const & const .OutItrT положить OutItrT следующим, std :: ios_base & aios, char_type fill_char, const part_date_type& pd constOutItrT положить OutItrT std :: ios_base & a_ios, char_type fill_char, const nth_kday_type & nkd] const ; OutItrT положить OutItrT следующим, std :: ios_base & a_ios, char_type fill_char, const first_kday_type& fkd constOutItrT положить OutItrT std :: ios_base & a_ios, char_type fill_char, const last_kday_type& lkd const; OutItrT положить OutItrT std ios_base & a_ios, char_type fill_char, const kday_before_type& fkb constOutItrT положить OutItrT следующая, std :: ios_base & a_ios, char_type fill_char, const kday_after_type& fka const; date_facet
protected member functionsСтатья Class template date_facet раздела The Boost C++ Libraries BoostBook Documentation Subset Library Reference может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная :: Library Reference ::