diff options
Diffstat (limited to 'doc/html/date_facet.html')
-rw-r--r-- | doc/html/date_facet.html | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/doc/html/date_facet.html b/doc/html/date_facet.html new file mode 100644 index 0000000000..55e60693fb --- /dev/null +++ b/doc/html/date_facet.html @@ -0,0 +1,207 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Class template date_facet</title> +<link rel="stylesheet" href="boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> +<link rel="start" href="index.html" title="The Boost C++ Libraries"> +<link rel="up" href="date_time/doxy.html#id2466656" title="Header <boost/date_time/date_facet.hpp>"> +<link rel="prev" href="years_duration.html" title="Class template years_duration"> +<link rel="next" href="date_input_facet.html" title="Class template date_input_facet"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"> +<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td> +<td align="center"><a href="../../index.htm">Home</a></td> +<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="../../people/people.htm">People</a></td> +<td align="center"><a href="../../more/faq.htm">FAQ</a></td> +<td align="center"><a href="../../more/index.htm">More</a></td> +</table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="years_duration.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2466656"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="date_input_facet.html"><img src="images/next.png" alt="Next"></a> +</div> +<div class="refentry" lang="en"> +<a name="date_facet"></a><div class="titlepage"></div> +<div class="refnamediv"> +<h2><span class="refentrytitle">Class template date_facet</span></h2> +<p>boost::date_time::date_facet — </p> +</div> +<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> +<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> date_type, <span class="bold"><strong>typename</strong></span> CharT, + <span class="bold"><strong>typename</strong></span> OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> > > +<span class="bold"><strong>class</strong></span> date_facet { +<span class="bold"><strong>public</strong></span>: + <span class="emphasis"><em>// types</em></span> + <span class="bold"><strong>typedef</strong></span> date_type::duration_type duration_type; + <span class="bold"><strong>typedef</strong></span> date_type::day_of_week_type day_of_week_type; + <span class="bold"><strong>typedef</strong></span> date_type::day_type day_type; + <span class="bold"><strong>typedef</strong></span> date_type::month_type month_type; + <span class="bold"><strong>typedef</strong></span> <a href="period.html" title="Class template period">boost::date_time::period</a>< date_type, duration_type > period_type; + <span class="bold"><strong>typedef</strong></span> std::basic_string< CharT > string_type; + <span class="bold"><strong>typedef</strong></span> CharT char_type; + <span class="bold"><strong>typedef</strong></span> <a href="period_formatter.html" title="Class template period_formatter">boost::date_time::period_formatter</a>< CharT > period_formatter_type; + <span class="bold"><strong>typedef</strong></span> <a href="special_values_formatter.html" title="Class template special_values_formatter">boost::date_time::special_values_formatter</a>< CharT > special_values_formatter_type; + <span class="bold"><strong>typedef</strong></span> std::vector< std::basic_string< CharT > > input_collection_type; + <span class="bold"><strong>typedef</strong></span> <a href="date_generator_formatter.html" title="Class template date_generator_formatter">date_generator_formatter</a>< date_type, CharT > date_gen_formatter_type; + <span class="bold"><strong>typedef</strong></span> <a href="partial_date.html" title="Class template partial_date">partial_date</a>< date_type > partial_date_type; + <span class="bold"><strong>typedef</strong></span> <a href="nth_kday_of_month.html" title="Class template nth_kday_of_month">nth_kday_of_month</a>< date_type > nth_kday_type; + <span class="bold"><strong>typedef</strong></span> <a href="first_kday_of_month.html" title="Class template first_kday_of_month">first_kday_of_month</a>< date_type > first_kday_type; + <span class="bold"><strong>typedef</strong></span> <a href="last_kday_of_month.html" title="Class template last_kday_of_month">last_kday_of_month</a>< date_type > last_kday_type; + <span class="bold"><strong>typedef</strong></span> <a href="first_kday_after.html" title="Class template first_kday_after">first_kday_after</a>< date_type > kday_after_type; + <span class="bold"><strong>typedef</strong></span> <a href="first_kday_before.html" title="Class template first_kday_before">first_kday_before</a>< date_type > kday_before_type; + + <span class="emphasis"><em>// <a href="date_facet.html#date_facetconstruct-copy-destruct">construct/copy/destruct</a></em></span> + <a href="date_facet.html#id2414624-bb">date_facet</a>(::size_t = 0); + <a href="date_facet.html#id2511410-bb">date_facet</a>(<span class="bold"><strong>const</strong></span> char_type *, <span class="bold"><strong>const</strong></span> input_collection_type &, ::size_t = 0); + <a href="date_facet.html#id2470519-bb">date_facet</a>(<span class="bold"><strong>const</strong></span> 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); + + <span class="emphasis"><em>// <a href="date_facet.html#id2405040-bb">public member functions</a></em></span> + <span class="type">std::locale::id &</span> <a href="date_facet.html#id2397315-bb">__get_id</a>(<span class="bold"><strong>void</strong></span>) <span class="bold"><strong>const</strong></span>; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2527043-bb">format</a>(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span>) ; + <span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2427578-bb">set_iso_format</a>() ; + <span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2493410-bb">set_iso_extended_format</a>() ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2454877-bb">month_format</a>(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span>) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2395087-bb">weekday_format</a>(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span>) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2384920-bb">period_formatter</a>(period_formatter_type) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2469408-bb">special_values_formatter</a>(<span class="bold"><strong>const</strong></span> special_values_formatter_type &) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2428903-bb">short_weekday_names</a>(<span class="bold"><strong>const</strong></span> input_collection_type &) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2478407-bb">long_weekday_names</a>(<span class="bold"><strong>const</strong></span> input_collection_type &) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2524139-bb">short_month_names</a>(<span class="bold"><strong>const</strong></span> input_collection_type &) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2521828-bb">long_month_names</a>(<span class="bold"><strong>const</strong></span> input_collection_type &) ; + <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="date_facet.html#id2466406-bb">date_gen_phrase_strings</a>(<span class="bold"><strong>const</strong></span> input_collection_type &, + <span class="bold"><strong>typename</strong></span> date_gen_formatter_type::phrase_elements = date_gen_formatter_type::first) ; + <span class="type">OutItrT</span> <a href="date_facet.html#id2458379-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> date_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2507227-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> duration_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2401693-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> month_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2522103-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> day_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2490936-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> day_of_week_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2459028-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> period_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2402728-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> partial_date_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2417087-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> nth_kday_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2491174-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> first_kday_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2392485-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> last_kday_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2432314-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> kday_before_type &) <span class="bold"><strong>const</strong></span>; + <span class="type">OutItrT</span> <a href="date_facet.html#id2490059-bb">put</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> kday_after_type &) <span class="bold"><strong>const</strong></span>; + + <span class="emphasis"><em>// <a href="date_facet.html#id2384216-bb">protected member functions</a></em></span> + <span class="type">tm</span> <a href="date_facet.html#id2384220-bb">init_tm</a>(tm &) <span class="bold"><strong>const</strong></span>; + <span class="type"><span class="bold"><strong>virtual</strong></span> OutItrT</span> + <a href="date_facet.html#id2427702-bb">do_put_special</a>(OutItrT, std::ios_base &, char_type, + <span class="bold"><strong>const</strong></span> boost::date_time::special_values) <span class="bold"><strong>const</strong></span>; + <span class="type"><span class="bold"><strong>virtual</strong></span> OutItrT</span> + <a href="date_facet.html#id2403932-bb">do_put_tm</a>(OutItrT, std::ios_base &, char_type, <span class="bold"><strong>const</strong></span> tm &, string_type) <span class="bold"><strong>const</strong></span>; + + <span class="bold"><strong>static</strong></span> const char_type long_weekday_format; + <span class="bold"><strong>static</strong></span> const char_type short_weekday_format; + <span class="bold"><strong>static</strong></span> const char_type long_month_format; + <span class="bold"><strong>static</strong></span> const char_type short_month_format; + <span class="bold"><strong>static</strong></span> const char_type default_period_separator; + <span class="bold"><strong>static</strong></span> const char_type standard_format_specifier; + <span class="bold"><strong>static</strong></span> const char_type iso_format_specifier; + <span class="bold"><strong>static</strong></span> const char_type iso_format_extended_specifier; + <span class="bold"><strong>static</strong></span> const char_type default_date_format; + <span class="bold"><strong>static</strong></span> std::locale::id id; +};</pre></div> +<div class="refsect1" lang="en"> +<a name="id2614661"></a><h2>Description</h2> +<p>Class that provides format based I/O facet for date types.</p> +<p>This class allows the formatting of dates by using format string. Format strings are:</p> +<div class="itemizedlist"><ul type="disc"> +<li><p>A => long_weekday_format - Full name Ex: Tuesday</p></li> +<li><p>a => short_weekday_format - Three letter abbreviation Ex: Tue</p></li> +<li><p>B => long_month_format - Full name Ex: October</p></li> +<li><p>b => short_month_format - Three letter abbreviation Ex: Oct</p></li> +<li><p>x => standard_format_specifier - defined by the locale</p></li> +<li><p>Y-%b-%d => default_date_format - YYYY-Mon-dd</p></li> +</ul></div> +<p>Default month format == b Default weekday format == a </p> +<div class="refsect2" lang="en"> +<a name="id2614709"></a><h3> +<a name="date_facetconstruct-copy-destruct"></a><code class="computeroutput">date_facet</code> construct/copy/destruct</h3> +<div class="orderedlist"><ol type="1"> +<li><pre class="literallayout"><a name="id2414624-bb"></a>date_facet(::size_t a_ref = 0);</pre></li> +<li><pre class="literallayout"><a name="id2511410-bb"></a>date_facet(<span class="bold"><strong>const</strong></span> char_type * format, + <span class="bold"><strong>const</strong></span> input_collection_type & short_month_names, + ::size_t ref_count = 0);</pre></li> +<li><pre class="literallayout"><a name="id2470519-bb"></a>date_facet(<span class="bold"><strong>const</strong></span> char_type * format, + period_formatter_type period_formatter = period_formatter_type(), + special_values_formatter_type special_values_formatter = special_values_formatter_type(), + date_gen_formatter_type dg_formatter = date_gen_formatter_type(), + ::size_t ref_count = 0);</pre></li> +</ol></div> +</div> +<div class="refsect2" lang="en"> +<a name="id2614804"></a><h3> +<a name="id2405040-bb"></a><code class="computeroutput">date_facet</code> public member functions</h3> +<div class="orderedlist"><ol type="1"> +<li><pre class="literallayout"><span class="type">std::locale::id &</span> <a name="id2397315-bb"></a>__get_id(<span class="bold"><strong>void</strong></span> ) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2527043-bb"></a>format(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span> format) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id2427578-bb"></a>set_iso_format() ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id2493410-bb"></a>set_iso_extended_format() ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2454877-bb"></a>month_format(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span> format) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2395087-bb"></a>weekday_format(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span> format) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2384920-bb"></a>period_formatter(period_formatter_type period_formatter) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2469408-bb"></a>special_values_formatter(<span class="bold"><strong>const</strong></span> special_values_formatter_type & svf) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2428903-bb"></a>short_weekday_names(<span class="bold"><strong>const</strong></span> input_collection_type & short_weekday_names) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2478407-bb"></a>long_weekday_names(<span class="bold"><strong>const</strong></span> input_collection_type & long_weekday_names) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2524139-bb"></a>short_month_names(<span class="bold"><strong>const</strong></span> input_collection_type & short_month_names) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2521828-bb"></a>long_month_names(<span class="bold"><strong>const</strong></span> input_collection_type & long_month_names) ;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2466406-bb"></a>date_gen_phrase_strings(<span class="bold"><strong>const</strong></span> input_collection_type & new_strings, + <span class="bold"><strong>typename</strong></span> date_gen_formatter_type::phrase_elements beg_pos = date_gen_formatter_type::first) ;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2458379-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> date_type & d) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2507227-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> duration_type & dd) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2401693-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> month_type & m) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2522103-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> day_type & day) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2490936-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> day_of_week_type & dow) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2459028-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> period_type & p) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2402728-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> partial_date_type & pd) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2417087-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> nth_kday_type & nkd) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2491174-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> first_kday_type & fkd) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2392485-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> last_kday_type & lkd) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2432314-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> kday_before_type & fkb) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type">OutItrT</span> <a name="id2490059-bb"></a>put(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> kday_after_type & fka) <span class="bold"><strong>const</strong></span>;</pre></li> +</ol></div> +</div> +<div class="refsect2" lang="en"> +<a name="id2615594"></a><h3> +<a name="id2384216-bb"></a><code class="computeroutput">date_facet</code> protected member functions</h3> +<div class="orderedlist"><ol type="1"> +<li><pre class="literallayout"><span class="type">tm</span> <a name="id2384220-bb"></a>init_tm(tm & tm_value) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> OutItrT</span> +<a name="id2427702-bb"></a>do_put_special(OutItrT next, std::ios_base & , char_type , + <span class="bold"><strong>const</strong></span> boost::date_time::special_values sv) <span class="bold"><strong>const</strong></span>;</pre></li> +<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> OutItrT</span> +<a name="id2403932-bb"></a>do_put_tm(OutItrT next, std::ios_base & a_ios, char_type fill_char, + <span class="bold"><strong>const</strong></span> tm & tm_value, string_type a_format) <span class="bold"><strong>const</strong></span>;</pre></li> +</ol></div> +</div> +</div> +</div> +<table width="100%"><tr> +<td align="left"></td> +<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="years_duration.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2466656"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="date_input_facet.html"><img src="images/next.png" alt="Next"></a> +</div> +</body> +</html> |