Facet used for format-based output of time types This class provides for the use of format strings to output times. More...
#include <time_facet.hpp>
Public Types | |
typedef time_type::date_type | date_type |
typedef time_type::time_duration_type | time_duration_type |
typedef boost::date_time::period < time_type, time_duration_type > | period_type |
typedef boost::date_time::date_facet < typename time_type::date_type, CharT, OutItrT > | base_type |
typedef base_type::string_type | string_type |
typedef base_type::char_type | char_type |
typedef base_type::period_formatter_type | period_formatter_type |
typedef base_type::special_values_formatter_type | special_values_formatter_type |
typedef base_type::date_gen_formatter_type | date_gen_formatter_type |
typedef time_type::date_type::duration_type | duration_type |
typedef time_type::date_type::day_of_week_type | day_of_week_type |
typedef time_type::date_type::day_type | day_type |
typedef time_type::date_type::month_type | month_type |
typedef std::vector < std::basic_string< CharT > > | input_collection_type |
typedef partial_date < time_type::date_type > | partial_date_type |
typedef nth_kday_of_month < time_type::date_type > | nth_kday_type |
typedef first_kday_of_month < time_type::date_type > | first_kday_type |
typedef last_kday_of_month < time_type::date_type > | last_kday_type |
typedef first_kday_after < time_type::date_type > | kday_after_type |
typedef first_kday_before < time_type::date_type > | kday_before_type |
Public Member Functions | |
time_facet (::size_t ref_arg=0) | |
sets default formats for ptime, local_date_time, and time_duration More... | |
time_facet (const char_type *format_arg, period_formatter_type period_formatter_arg=period_formatter_type(), const special_values_formatter_type &special_value_formatter=special_values_formatter_type(), date_gen_formatter_type dg_formatter=date_gen_formatter_type(),::size_t ref_arg=0) | |
Construct the facet with an explicitly specified format. More... | |
void | time_duration_format (const char_type *const format) |
Changes format for time_duration. More... | |
virtual void | set_iso_format () |
virtual void | set_iso_extended_format () |
OutItrT | put (OutItrT next_arg, std::ios_base &ios_arg, char_type fill_arg, const time_type &time_arg) const |
OutItrT | put (OutItrT next_arg, std::ios_base &ios_arg, char_type fill_arg, const time_duration_type &time_dur_arg) const |
put function for time_duration More... | |
OutItrT | put (OutItrT next, std::ios_base &ios_arg, char_type fill, const period_type &p) const |
void | format (const char_type *const format_str) |
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 | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const time_type::date_type &d) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const duration_type &dd) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const month_type &m) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const day_type &day) const |
puts the day of month More... | |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const day_of_week_type &dow) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const period_type &p) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const partial_date_type &pd) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const nth_kday_type &nkd) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const first_kday_type &fkd) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const last_kday_type &lkd) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const kday_before_type &fkb) const |
OutItrT | put (OutItrT next, std::ios_base &a_ios, char_type fill_char, const kday_after_type &fka) const |
Static Public Attributes | |
static const char_type * | fractional_seconds_format = time_formats<CharT>::fractional_seconds_format |
static const char_type * | fractional_seconds_or_none_format = time_formats<CharT>::fractional_seconds_or_none_format |
static const char_type * | seconds_with_fractional_seconds_format |
static const char_type * | seconds_format = time_formats<CharT>::seconds_format |
static const char_type * | hours_format = time_formats<CharT>::hours_format |
static const char_type * | unrestricted_hours_format = time_formats<CharT>::unrestricted_hours_format |
static const char_type * | standard_format = time_formats<CharT>::standard_format |
static const char_type * | zone_abbrev_format = time_formats<CharT>::zone_abbrev_format |
static const char_type * | zone_name_format = time_formats<CharT>::zone_name_format |
static const char_type * | zone_iso_format = time_formats<CharT>::zone_iso_format |
static const char_type * | zone_iso_extended_format =time_formats<CharT>::zone_iso_extended_format |
static const char_type * | posix_zone_string_format =time_formats<CharT>::posix_zone_string_format |
static const char_type * | duration_seperator = time_formats<CharT>::duration_seperator |
static const char_type * | duration_sign_always = time_formats<CharT>::duration_sign_always |
static const char_type * | duration_sign_negative_only = time_formats<CharT>::duration_sign_negative_only |
static const char_type * | negative_sign = time_formats<CharT>::negative_sign |
static const char_type * | positive_sign = time_formats<CharT>::positive_sign |
static const char_type * | iso_time_format_specifier = time_formats<CharT>::iso_time_format_specifier |
static const char_type * | iso_time_format_extended_specifier = time_formats<CharT>::iso_time_format_extended_specifier |
static const char_type * | default_time_format |
static const char_type * | default_time_duration_format |
static std::locale::id | id |
static const char_type | long_weekday_format [3] |
static const char_type | short_weekday_format [3] |
static const char_type | long_month_format [3] |
static const char_type | short_month_format [3] |
static const char_type | default_period_separator [4] |
static const char_type | standard_format_specifier [3] |
static const char_type | iso_format_specifier [7] |
static const char_type | iso_format_extended_specifier [9] |
static const char_type | default_date_format [9] |
Protected Member Functions | |
virtual OutItrT | do_put_special (OutItrT next, std::ios_base &, char_type, const boost::date_time::special_values sv) const |
virtual OutItrT | do_put_tm (OutItrT next, std::ios_base &a_ios, char_type fill_char, const tm &tm_value, string_type a_format) const |
Static Protected Member Functions | |
static string_type | fractional_seconds_as_string (const time_duration_type &time_arg, bool null_when_zero) |
static string_type | hours_as_string (const time_duration_type &time_arg, int width=2) |
template<typename IntT > | |
static string_type | integral_as_string (IntT val, int width=2) |
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:
typedef boost::date_time::date_facet<typename time_type::date_type, CharT, OutItrT> boost::date_time::time_facet< time_type, CharT, OutItrT >::base_type |
typedef base_type::char_type boost::date_time::time_facet< time_type, CharT, OutItrT >::char_type |
typedef base_type::date_gen_formatter_type boost::date_time::time_facet< time_type, CharT, OutItrT >::date_gen_formatter_type |
typedef time_type::date_type boost::date_time::time_facet< time_type, CharT, OutItrT >::date_type |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
typedef base_type::period_formatter_type boost::date_time::time_facet< time_type, CharT, OutItrT >::period_formatter_type |
typedef boost::date_time::period<time_type,time_duration_type> boost::date_time::time_facet< time_type, CharT, OutItrT >::period_type |
typedef base_type::special_values_formatter_type boost::date_time::time_facet< time_type, CharT, OutItrT >::special_values_formatter_type |
typedef base_type::string_type boost::date_time::time_facet< time_type, CharT, OutItrT >::string_type |
typedef time_type::time_duration_type boost::date_time::time_facet< time_type, CharT, OutItrT >::time_duration_type |
|
inlineexplicit |
sets default formats for ptime, local_date_time, and time_duration
|
inlineexplicit |
Construct the facet with an explicitly specified format.
|
inlineinherited |
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtualinherited |
References boost::date_time::date_facet< date_type, CharT, OutItrT >::m_month_long_names, boost::date_time::date_facet< date_type, CharT, OutItrT >::m_month_short_names, boost::date_time::date_facet< date_type, CharT, OutItrT >::m_weekday_long_names, boost::date_time::date_facet< date_type, CharT, OutItrT >::m_weekday_short_names, boost::date_time::date_facet< date_type, CharT, OutItrT >::put(), and boost::algorithm::replace_all().
Referenced by boost::date_time::time_facet< time_type, CharT, OutItrT >::put().
|
inlineinherited |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
puts the day of month
References boost::date_time::date_facet< date_type, CharT, OutItrT >::do_put_tm().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
References boost::as_literal(), boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::do_put_special(), boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::do_put_tm(), boost::algorithm::erase_all(), boost::date_time::time_facet< time_type, CharT, OutItrT >::fractional_seconds_as_string(), boost::date_time::time_formats< CharT >::full_24_hour_time_expanded_format, boost::date_time::time_formats< CharT >::full_24_hour_time_format, boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::m_format, boost::algorithm::replace_all(), boost::date_time::time_formats< CharT >::short_24_hour_time_expanded_format, boost::date_time::time_formats< CharT >::short_24_hour_time_format, boost::gregorian::to_tm(), boost::date_time::time_facet< time_type, CharT, OutItrT >::zone_abbrev_format, and boost::date_time::time_facet< time_type, CharT, OutItrT >::zone_name_format.
|
inlineinherited |
|
inlineinherited |
|
inline |
put function for time_duration
References boost::as_literal(), BOOST_ASSERT, boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::do_put_special(), boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::do_put_tm(), boost::algorithm::erase_all(), boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::format(), boost::date_time::time_facet< time_type, CharT, OutItrT >::fractional_seconds_as_string(), boost::date_time::time_formats< CharT >::full_24_hour_time_expanded_format, boost::date_time::time_formats< CharT >::full_24_hour_time_format, boost::date_time::time_facet< time_type, CharT, OutItrT >::hours_as_string(), boost::algorithm::replace_all(), boost::date_time::time_formats< CharT >::short_24_hour_time_expanded_format, boost::date_time::time_formats< CharT >::short_24_hour_time_format, and boost::gregorian::to_tm().
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Changes format for time_duration.
References boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::format().
|
inlineinherited |
|
staticinherited |
|
staticinherited |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticinherited |
|
staticinherited |
|
static |
|
static |
|
staticinherited |
|
staticinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticinherited |
|
staticinherited |
|
static |
|
staticinherited |
|
static |
|
static |
|
static |
|
static |
|
static |