Files
tomlplusplus/structtoml_1_1date__time.html
2020-04-02 21:42:59 +00:00

285 lines
18 KiB
HTML

<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8"/>
<title>toml::date_time struct | toml++ TOML
for
modern
C++</title>
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" rel="stylesheet"/>
<link href="m-dark+documentation.compiled.css" rel="stylesheet"/>
<link href="tomlplusplus.css" rel="stylesheet"/>
<link href="favicon.ico" rel="icon" type="image/vnd.microsoft.icon"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta content="#22272e" name="theme-color"/>
<meta content="gbtcNgKlNiPSMKkYMw4zWFVWGPH_oU93m9n_-nb4qK8" name="google-site-verification"/>
<meta content="Header-only
TOML
config
file
parser
and
serializer
for
modern
C++." name="description"/>
<script src="tomlplusplus.js"></script>
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a class="m-col-t-8 m-col-m-none m-left-m" href="index.html" id="m-navbar-brand"><img src="logo.png"/>toml++ <span class="m-thin">TOML
for
modern
C++</span></a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a class="m-doc-search-icon" href="#search" onclick="return showSearch()" title="Search"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z" id="m-doc-search-icon-path"></path>
</svg></a>
<a href="#navigation" id="m-navbar-show" title="Show navigation"></a>
<a href="#" id="m-navbar-hide" title="Hide navigation"></a>
</div>
<div class="m-col-t-12 m-show-m m-col-m-none m-right-m" id="m-navbar-collapse">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
<li><a href="namespaces.html">Namespaces</a></li>
</ol>
<ol class="m-col-t-6 m-col-m-none" start="2">
<li><a href="annotated.html">Classes</a></li>
<li><a class="github" href="https://github.com/marzer/tomlplusplus/" target="_blank">Github</a></li>
<li class="m-show-m"><a class="m-doc-search-icon" href="#search" onclick="return showSearch()" title="Search"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path"></use>
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
<span class="m-breadcrumb"><a href="namespacetoml.html">toml</a>::<wbr/></span><a class="m-doc tpp-injected" href="structtoml_1_1date__time.html">date_time</a> <span class="m-thin">struct</span> <span class="m-label m-flat m-warning">final</span>
</h1>
<p>A date-<a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a>.</p>
<div class="m-block m-default">
<h3>Contents</h3>
<ul>
<li>
Reference
<ul>
<li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
<li><a href="#pub-methods">Public functions</a></li>
<li><a href="#pub-attribs">Public variables</a></li>
<li><a href="#friends">Friends</a></li>
</ul>
</li>
</ul>
</div>
<section id="typeless-methods">
<h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
<dl class="m-doc">
<dt id="a58660e699081a0e3b44ea9564dcbec64">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a58660e699081a0e3b44ea9564dcbec64">date_time</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Default-constructs a zero date-<a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a>.</dd>
<dt>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="#ae96326775192b72b5a20016b800d6d0c">date_time</a>(</span><span class="m-doc-wrap"><a class="m-doc" href="structtoml_1_1date.html">toml::<wbr/>date</a> d,
<a class="m-doc" href="structtoml_1_1time.html">toml::<wbr/>time</a> t) <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Constructs a local date-<a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a>.</dd>
<dt>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="#a613da4fbfb0731e6f926ccafedcc69f1">date_time</a>(</span><span class="m-doc-wrap"><a class="m-doc" href="structtoml_1_1date.html">toml::<wbr/>date</a> d,
<a class="m-doc" href="structtoml_1_1time.html">toml::<wbr/>time</a> t,
<a class="m-doc" href="structtoml_1_1time__offset.html">toml::<wbr/>time_offset</a> offset) <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Constructs an offset date-<a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a>.</dd>
</dl>
</section>
<section id="pub-methods">
<h2><a href="#pub-methods">Public functions</a></h2>
<dl class="m-doc">
<dt id="af0d6119984645eb015f2fad0ef487bbc">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#af0d6119984645eb015f2fad0ef487bbc">is_local</a>(</span><span class="m-doc-wrap">) const -&gt; bool <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns true if this <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a> does not contain timezone offset information.</dd>
</dl>
</section>
<section id="pub-attribs">
<h2><a href="#pub-attribs">Public variables</a></h2>
<dl class="m-doc">
<dt id="a89f398585f373d1e7bd59fe440212074">
<a class="m-doc" href="structtoml_1_1date.html">toml::<wbr/>date</a> <a class="m-doc-self" href="#a89f398585f373d1e7bd59fe440212074">date</a>
</dt>
<dd>The <a class="m-doc tpp-injected" href="structtoml_1_1date.html">date</a> component.</dd>
<dt id="a18d5e772db4f61635643cda390c2b720">
<a class="m-doc" href="structtoml_1_1time.html">toml::<wbr/>time</a> <a class="m-doc-self" href="#a18d5e772db4f61635643cda390c2b720">time</a>
</dt>
<dd>The <a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a> component.</dd>
<dt>
<a class="m-doc" href="namespacetoml.html#af34a9fb3305e419784104609e6bbb7ac">optional</a>&lt;<a class="m-doc" href="structtoml_1_1time__offset.html">toml::<wbr/>time_offset</a>&gt; <a class="m-doc" href="#ae3a58086e733cc92c4a1466ab42b5d6a">time_offset</a>
</dt>
<dd>The timezone offset component.</dd>
</dl>
</section>
<section id="friends">
<h2><a href="#friends">Friends</a></h2>
<dl class="m-doc">
<dt id="a9ae0e032ffe90928c47b40bd8155dea3">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a9ae0e032ffe90928c47b40bd8155dea3">operator!=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; lhs,
const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; rhs) -&gt; friend bool <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Inequality operator.</dd>
<dt id="a4f67803fdc02fb5549ba213a9273a63b">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a4f67803fdc02fb5549ba213a9273a63b">operator&lt;</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; lhs,
const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; rhs) -&gt; friend bool <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Less-than operator.</dd>
<dt id="a7b2f0261ae38ef6dbb6de0fb35fbbf3b">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a7b2f0261ae38ef6dbb6de0fb35fbbf3b">operator&lt;=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; lhs,
const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; rhs) -&gt; friend bool <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Less-than-or-equal-to operator.</dd>
<dt id="a885cbe902aeadacb0953230ade9d8b9a">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a885cbe902aeadacb0953230ade9d8b9a">operator==</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; lhs,
const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; rhs) -&gt; friend bool <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Equality operator.</dd>
<dt id="a1bceb05028f33a829d61ffc768eab78a">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a1bceb05028f33a829d61ffc768eab78a">operator&gt;</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; lhs,
const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; rhs) -&gt; friend bool <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Greater-than operator.</dd>
<dt id="a361fb1904f477e0a1f7acaa3cdd14abf">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a361fb1904f477e0a1f7acaa3cdd14abf">operator&gt;=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; lhs,
const <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a>&amp; rhs) -&gt; friend bool <span class="m-label m-flat m-primary">constexpr</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Greater-than-or-equal-to operator.</dd>
</dl>
</section>
<section>
<h2>Function documentation</h2>
<section class="m-doc-details" id="ae96326775192b72b5a20016b800d6d0c"><div>
<h3>
<span class="m-doc-wrap-bumper"> toml::<wbr/><a class="m-doc tpp-injected" href="structtoml_1_1date__time.html">date_time</a>::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#ae96326775192b72b5a20016b800d6d0c">date_time</a>(</span><span class="m-doc-wrap"><a class="m-doc" href="structtoml_1_1date.html">toml::<wbr/>date</a> d,
<a class="m-doc" href="structtoml_1_1time.html">toml::<wbr/>time</a> t) <span class="m-label m-primary">constexpr</span> <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Constructs a local date-<a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a>.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">d</td>
<td>The <a class="m-doc tpp-injected" href="structtoml_1_1date.html">date</a> component.</td>
</tr>
<tr>
<td>t</td>
<td>The <a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a> component.</td>
</tr>
</tbody>
</table>
</div></section>
<section class="m-doc-details" id="a613da4fbfb0731e6f926ccafedcc69f1"><div>
<h3>
<span class="m-doc-wrap-bumper"> toml::<wbr/><a class="m-doc tpp-injected" href="structtoml_1_1date__time.html">date_time</a>::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a613da4fbfb0731e6f926ccafedcc69f1">date_time</a>(</span><span class="m-doc-wrap"><a class="m-doc" href="structtoml_1_1date.html">toml::<wbr/>date</a> d,
<a class="m-doc" href="structtoml_1_1time.html">toml::<wbr/>time</a> t,
<a class="m-doc" href="structtoml_1_1time__offset.html">toml::<wbr/>time_offset</a> offset) <span class="m-label m-primary">constexpr</span> <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Constructs an offset date-<a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a>.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">d</td>
<td>The <a class="m-doc tpp-injected" href="structtoml_1_1date.html">date</a> component.</td>
</tr>
<tr>
<td>t</td>
<td>The <a class="m-doc tpp-injected" href="structtoml_1_1time.html">time</a> component.</td>
</tr>
<tr>
<td>offset</td>
<td>The timezone offset.</td>
</tr>
</tbody>
</table>
</div></section>
</section>
<section>
<h2>Variable documentation</h2>
<section class="m-doc-details" id="ae3a58086e733cc92c4a1466ab42b5d6a"><div>
<h3>
<a class="m-doc" href="namespacetoml.html#af34a9fb3305e419784104609e6bbb7ac">optional</a>&lt;<a class="m-doc" href="structtoml_1_1time__offset.html">toml::<wbr/>time_offset</a>&gt; toml::<wbr/><a class="m-doc tpp-injected" href="structtoml_1_1date__time.html">date_time</a>::<wbr/><a class="m-doc-self" href="#ae3a58086e733cc92c4a1466ab42b5d6a">time_offset</a>
</h3>
<p>The timezone offset component.</p>
<aside class="m-note m-default"><h4>Remark</h4><p>The <a class="m-doc" href="structtoml_1_1date__time.html">date_<wbr/>time</a> is said to be 'local' if the <a class="m-doc" href="structtoml_1_1time__offset.html">time_<wbr/>offset</a> is empty.</p></aside>
</div></section>
</section>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount"></div>
</div>
<div class="m-doc-search-content">
<form>
<input autocomplete="off" autofocus="autofocus" disabled="disabled" id="search-input" name="q" placeholder="Loading …" spellcheck="false" type="search"/>
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div class="m-text m-dim m-text-center" id="search-help">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim"></span>
/ <span class="m-label m-dim"></span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div class="m-text m-warning m-text-center" id="search-notfound">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v1.js"></script>
<script async="async" src="searchdata-v1.js"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<a href="https://github.com/marzer/tomlplusplus/" target="_blank">Github</a>
<a href="https://github.com/marzer/tomlplusplus/issues" target="_blank">Report
an
issue</a>
<br/><br/>Documentation
generated
using
<a href="https://mcss.mosra.cz/">m.css</a>
</div>
</div>
</div>
</nav></footer>
</body></html>