Enable parse and format for more types:

* year
    * month
    * day
    * weekday
    * year_month
    * month_day
This commit is contained in:
Howard Hinnant
2017-03-25 17:45:39 -04:00
parent f3b61aab48
commit 82c6d6a3a4

81
tz.html
View File

@@ -26,7 +26,7 @@
<br/> <br/>
<br/> <br/>
<a href="mailto:howard.hinnant@gmail.com">Howard E. Hinnant</a><br/> <a href="mailto:howard.hinnant@gmail.com">Howard E. Hinnant</a><br/>
2017-03-22<br/> 2017-03-25<br/>
</address> </address>
<hr/> <hr/>
<h1 align=center>Time Zone Database Parser</h1> <h1 align=center>Time Zone Database Parser</h1>
@@ -2027,6 +2027,49 @@ make_zoned(const std::string&amp; name, const sys_time&lt;Duration&gt;&amp; st)
<a name="to_stream"></a><h3><code>to_stream</code></h3> <a name="to_stream"></a><h3><code>to_stream</code></h3>
<blockquote> <blockquote>
<pre>
template &lt;class CharT, class Traits&gt;
void
to_stream(std::basic_ostream&lt;CharT, Traits&gt;&amp; os, const CharT* fmt,
const year&amp; y);
</pre>
<pre>
template &lt;class CharT, class Traits&gt;
void
to_stream(std::basic_ostream&lt;CharT, Traits&gt;&amp; os, const CharT* fmt,
const month&amp; m);
</pre>
<pre>
template &lt;class CharT, class Traits&gt;
void
to_stream(std::basic_ostream&lt;CharT, Traits&gt;&amp; os, const CharT* fmt,
const day&amp; d);
</pre>
<pre>
template &lt;class CharT, class Traits&gt;
void
to_stream(std::basic_ostream&lt;CharT, Traits&gt;&amp; os, const CharT* fmt,
const weekday&amp; wd);
</pre>
<pre>
template &lt;class CharT, class Traits&gt;
void
to_stream(std::basic_ostream&lt;CharT, Traits&gt;&amp; os, const CharT* fmt,
const year_month&amp; ym);
</pre>
<pre>
template &lt;class CharT, class Traits&gt;
void
to_stream(std::basic_ostream&lt;CharT, Traits&gt;&amp; os, const CharT* fmt,
const month_day&amp; md);
</pre>
<pre> <pre>
template &lt;class CharT, class Traits, , class Rep, class Period&gt; template &lt;class CharT, class Traits, , class Rep, class Period&gt;
void void
@@ -2208,6 +2251,42 @@ For the overloads taking a <code>zoned_time</code> it is the value returned by
<blockquote> <blockquote>
<pre> <pre>
template &lt;class CharT, class Traits, class Alloc = std::allocator&lt;CharT&gt;&gt;
void
from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt, year&amp; y,
std::basic_string&lt;CharT, Traits, Alloc&gt;* abbrev = nullptr,
std::chrono::minutes* offset = nullptr);
template &lt;class CharT, class Traits, class Alloc = std::allocator&lt;CharT&gt;&gt;
void
from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt, month&amp; m,
std::basic_string&lt;CharT, Traits, Alloc&gt;* abbrev = nullptr,
std::chrono::minutes* offset = nullptr);
template &lt;class CharT, class Traits, class Alloc = std::allocator&lt;CharT&gt;&gt;
void
from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt, day&amp; d,
std::basic_string&lt;CharT, Traits, Alloc&gt;* abbrev = nullptr,
std::chrono::minutes* offset = nullptr);
template &lt;class CharT, class Traits, class Alloc = std::allocator&lt;CharT&gt;&gt;
void
from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt, weekday&amp; wd,
std::basic_string&lt;CharT, Traits, Alloc&gt;* abbrev = nullptr,
std::chrono::minutes* offset = nullptr);
template &lt;class CharT, class Traits, class Alloc = std::allocator&lt;CharT&gt;&gt;
void
from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt, year_month&amp; ym,
std::basic_string&lt;CharT, Traits, Alloc&gt;* abbrev = nullptr,
std::chrono::minutes* offset = nullptr);
template &lt;class CharT, class Traits, class Alloc = std::allocator&lt;CharT&gt;&gt;
void
from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt, month_day&amp; md,
std::basic_string&lt;CharT, Traits, Alloc&gt;* abbrev = nullptr,
std::chrono::minutes* offset = nullptr);
template &lt;class CharT, class Traits&gt; template &lt;class CharT, class Traits&gt;
void void
from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt, from_stream(std::basic_istream&lt;CharT, Traits&gt;&amp; is, const CharT* fmt,