mentat/chrono/struct.DateTime.html
2018-08-22 17:04:13 +00:00

455 lines
No EOL
109 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `DateTime` struct in crate `chrono`.">
<meta name="keywords" content="rust, rustlang, rust-lang, DateTime">
<title>chrono::DateTime - Rust</title>
<link rel="stylesheet" type="text/css" href="../normalize.css">
<link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../dark.css">
<link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
<script src="../storage.js"></script>
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Struct DateTime</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.from_utc">from_utc</a><a href="#method.date">date</a><a href="#method.time">time</a><a href="#method.timestamp">timestamp</a><a href="#method.timestamp_millis">timestamp_millis</a><a href="#method.timestamp_nanos">timestamp_nanos</a><a href="#method.timestamp_subsec_millis">timestamp_subsec_millis</a><a href="#method.timestamp_subsec_micros">timestamp_subsec_micros</a><a href="#method.timestamp_subsec_nanos">timestamp_subsec_nanos</a><a href="#method.offset">offset</a><a href="#method.timezone">timezone</a><a href="#method.with_timezone">with_timezone</a><a href="#method.checked_add_signed">checked_add_signed</a><a href="#method.checked_sub_signed">checked_sub_signed</a><a href="#method.signed_duration_since">signed_duration_since</a><a href="#method.naive_utc">naive_utc</a><a href="#method.naive_local">naive_local</a><a href="#method.parse_from_rfc2822">parse_from_rfc2822</a><a href="#method.parse_from_rfc3339">parse_from_rfc3339</a><a href="#method.parse_from_str">parse_from_str</a><a href="#method.to_rfc2822">to_rfc2822</a><a href="#method.to_rfc3339">to_rfc3339</a><a href="#method.to_rfc3339_opts">to_rfc3339_opts</a><a href="#method.format_with_items">format_with_items</a><a href="#method.format">format</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Add%3CFixedOffset%3E">Add&lt;FixedOffset&gt;</a><a href="#impl-Sub%3CFixedOffset%3E">Sub&lt;FixedOffset&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Clone">Clone</a><a href="#impl-Datelike">Datelike</a><a href="#impl-Timelike">Timelike</a><a href="#impl-Copy">Copy</a><a href="#impl-Send">Send</a><a href="#impl-PartialEq%3CDateTime%3CTz2%3E%3E">PartialEq&lt;DateTime&lt;Tz2&gt;&gt;</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialOrd">PartialOrd</a><a href="#impl-Ord">Ord</a><a href="#impl-Hash">Hash</a><a href="#impl-Add%3COldDuration%3E">Add&lt;OldDuration&gt;</a><a href="#impl-Sub%3COldDuration%3E">Sub&lt;OldDuration&gt;</a><a href="#impl-Sub%3CDateTime%3CTz%3E%3E">Sub&lt;DateTime&lt;Tz&gt;&gt;</a><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-FromStr">FromStr</a><a href="#impl-From%3CSystemTime%3E">From&lt;SystemTime&gt;</a><a href="#impl-From%3CDateTime%3CTz%3E%3E">From&lt;DateTime&lt;Tz&gt;&gt;</a></div></div><p class='location'><a href='index.html'>chrono</a></p><script>window.sidebarCurrent = {name: 'DateTime', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>chrono</a>::<wbr><a class="struct" href=''>DateTime</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../src/chrono/datetime.rs.html#58-61' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct DateTime&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; { /* fields omitted */ }</pre><div class='docblock'><p>ISO 8601 combined date and time with time zone.</p>
<p>There are some constructors implemented here (the <code>from_*</code> methods), but
the general-purpose constructors are all via the methods on the
<a href="./offset/trait.TimeZone.html"><code>TimeZone</code></a> implementations.</p>
</div>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#63-236' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from_utc' class="method"><span id='from_utc.v' class='invisible'><code>pub fn <a href='#method.from_utc' class='fnname'>from_utc</a>(datetime: <a class="struct" href="../chrono/naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>, offset: Tz::<a class="type" href="../chrono/offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#78-80' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new <code>DateTime</code> with given <em>UTC</em> datetime and offset.
The local datetime should be constructed via the <code>TimeZone</code> trait.</p>
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">chrono</span>::{<span class="ident">DateTime</span>, <span class="ident">TimeZone</span>, <span class="ident">NaiveDateTime</span>, <span class="ident">Utc</span>};
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">DateTime</span>::<span class="op">&lt;</span><span class="ident">Utc</span><span class="op">&gt;</span>::<span class="ident">from_utc</span>(<span class="ident">NaiveDateTime</span>::<span class="ident">from_timestamp</span>(<span class="number">61</span>, <span class="number">0</span>), <span class="ident">Utc</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Utc</span>.<span class="ident">timestamp</span>(<span class="number">61</span>, <span class="number">0</span>), <span class="ident">dt</span>);</pre>
</div><h4 id='method.date' class="method"><span id='date.v' class='invisible'><code>pub fn <a href='#method.date' class='fnname'>date</a>(&amp;self) -&gt; <a class="struct" href="../chrono/struct.Date.html" title="struct chrono::Date">Date</a>&lt;Tz&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#84-86' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Retrieves a date component.</p>
</div><h4 id='method.time' class="method"><span id='time.v' class='invisible'><code>pub fn <a href='#method.time' class='fnname'>time</a>(&amp;self) -&gt; <a class="struct" href="../chrono/naive/struct.NaiveTime.html" title="struct chrono::naive::NaiveTime">NaiveTime</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#91-93' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Retrieves a time component.
Unlike <code>date</code>, this is not associated to the time zone.</p>
</div><h4 id='method.timestamp' class="method"><span id='timestamp.v' class='invisible'><code>pub fn <a href='#method.timestamp' class='fnname'>timestamp</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#98-100' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of non-leap seconds since January 1, 1970 0:00:00 UTC
(aka &quot;UNIX timestamp&quot;).</p>
</div><h4 id='method.timestamp_millis' class="method"><span id='timestamp_millis.v' class='invisible'><code>pub fn <a href='#method.timestamp_millis' class='fnname'>timestamp_millis</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#122-124' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of non-leap-milliseconds since January 1, 1970 UTC</p>
<p>Note that this does reduce the number of years that can be represented
from ~584 Billion to ~584 Million. (If this is a problem, please file
an issue to let me know what domain needs millisecond precision over
billions of years, I'm curious.)</p>
<h1 id="example-1" class="section-header"><a href="#example-1">Example</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">chrono</span>::<span class="ident">Utc</span>;
<span class="kw">use</span> <span class="ident">chrono</span>::<span class="ident">TimeZone</span>;
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">1970</span>, <span class="number">1</span>, <span class="number">1</span>).<span class="ident">and_hms_milli</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">444</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_millis</span>(), <span class="number">1_444</span>);
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2001</span>, <span class="number">9</span>, <span class="number">9</span>).<span class="ident">and_hms_milli</span>(<span class="number">1</span>, <span class="number">46</span>, <span class="number">40</span>, <span class="number">555</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_millis</span>(), <span class="number">1_000_000_000_555</span>);</pre>
</div><h4 id='method.timestamp_nanos' class="method"><span id='timestamp_nanos.v' class='invisible'><code>pub fn <a href='#method.timestamp_nanos' class='fnname'>timestamp_nanos</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#146-148' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of non-leap-nanoseconds since January 1, 1970 UTC</p>
<p>Note that this does reduce the number of years that can be represented
from ~584 Billion to ~584. (If this is a problem, please file
an issue to let me know what domain needs nanosecond precision over
millenia, I'm curious.)</p>
<h1 id="example-2" class="section-header"><a href="#example-2">Example</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">chrono</span>::<span class="ident">Utc</span>;
<span class="kw">use</span> <span class="ident">chrono</span>::<span class="ident">TimeZone</span>;
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">1970</span>, <span class="number">1</span>, <span class="number">1</span>).<span class="ident">and_hms_nano</span>(<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">444</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_nanos</span>(), <span class="number">1_000_000_444</span>);
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2001</span>, <span class="number">9</span>, <span class="number">9</span>).<span class="ident">and_hms_nano</span>(<span class="number">1</span>, <span class="number">46</span>, <span class="number">40</span>, <span class="number">555</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">timestamp_nanos</span>(), <span class="number">1_000_000_000_000_000_555</span>);</pre>
</div><h4 id='method.timestamp_subsec_millis' class="method"><span id='timestamp_subsec_millis.v' class='invisible'><code>pub fn <a href='#method.timestamp_subsec_millis' class='fnname'>timestamp_subsec_millis</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#156-158' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of milliseconds since the last second boundary</p>
<p>warning: in event of a leap second, this may exceed 999</p>
<p>note: this is not the number of milliseconds since January 1, 1970 0:00:00 UTC</p>
</div><h4 id='method.timestamp_subsec_micros' class="method"><span id='timestamp_subsec_micros.v' class='invisible'><code>pub fn <a href='#method.timestamp_subsec_micros' class='fnname'>timestamp_subsec_micros</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#166-168' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of microseconds since the last second boundary</p>
<p>warning: in event of a leap second, this may exceed 999_999</p>
<p>note: this is not the number of microseconds since January 1, 1970 0:00:00 UTC</p>
</div><h4 id='method.timestamp_subsec_nanos' class="method"><span id='timestamp_subsec_nanos.v' class='invisible'><code>pub fn <a href='#method.timestamp_subsec_nanos' class='fnname'>timestamp_subsec_nanos</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#176-178' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of nanoseconds since the last second boundary</p>
<p>warning: in event of a leap second, this may exceed 999_999_999</p>
<p>note: this is not the number of nanoseconds since January 1, 1970 0:00:00 UTC</p>
</div><h4 id='method.offset' class="method"><span id='offset.v' class='invisible'><code>pub fn <a href='#method.offset' class='fnname'>offset</a>(&amp;self) -&gt; &amp;Tz::<a class="type" href="../chrono/offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#182-184' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Retrieves an associated offset from UTC.</p>
</div><h4 id='method.timezone' class="method"><span id='timezone.v' class='invisible'><code>pub fn <a href='#method.timezone' class='fnname'>timezone</a>(&amp;self) -&gt; Tz</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#188-190' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Retrieves an associated time zone.</p>
</div><h4 id='method.with_timezone' class="method"><span id='with_timezone.v' class='invisible'><code>pub fn <a href='#method.with_timezone' class='fnname'>with_timezone</a>&lt;Tz2:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt;(&amp;self, tz: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Tz2) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz2&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#195-197' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Changes the associated time zone.
This does not change the actual <code>DateTime</code> (but will change the string representation).</p>
</div><h4 id='method.checked_add_signed' class="method"><span id='checked_add_signed.v' class='invisible'><code>pub fn <a href='#method.checked_add_signed' class='fnname'>checked_add_signed</a>(self, rhs: <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#203-206' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Adds given <code>Duration</code> to the current date and time.</p>
<p>Returns <code>None</code> when it will result in overflow.</p>
</div><h4 id='method.checked_sub_signed' class="method"><span id='checked_sub_signed.v' class='invisible'><code>pub fn <a href='#method.checked_sub_signed' class='fnname'>checked_sub_signed</a>(self, rhs: <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#212-215' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Subtracts given <code>Duration</code> from the current date and time.</p>
<p>Returns <code>None</code> when it will result in overflow.</p>
</div><h4 id='method.signed_duration_since' class="method"><span id='signed_duration_since.v' class='invisible'><code>pub fn <a href='#method.signed_duration_since' class='fnname'>signed_duration_since</a>&lt;Tz2:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz2&gt;<br>) -&gt; <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#221-223' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Subtracts another <code>DateTime</code> from the current date and time.
This does not overflow or underflow at all.</p>
</div><h4 id='method.naive_utc' class="method"><span id='naive_utc.v' class='invisible'><code>pub fn <a href='#method.naive_utc' class='fnname'>naive_utc</a>(&amp;self) -&gt; <a class="struct" href="../chrono/naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#227-229' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a view to the naive UTC datetime.</p>
</div><h4 id='method.naive_local' class="method"><span id='naive_local.v' class='invisible'><code>pub fn <a href='#method.naive_local' class='fnname'>naive_local</a>(&amp;self) -&gt; <a class="struct" href="../chrono/naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#233-235' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a view to the naive local datetime.</p>
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><code>impl <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt;</code><a href='#impl-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#244-291' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.parse_from_rfc2822' class="method"><span id='parse_from_rfc2822.v' class='invisible'><code>pub fn <a href='#method.parse_from_rfc2822' class='fnname'>parse_from_rfc2822</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#247-252' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Parses an RFC 2822 date and time string such as <code>Tue, 1 Jul 2003 10:52:37 +0200</code>,
then returns a new <code>DateTime</code> with a parsed <code>FixedOffset</code>.</p>
</div><h4 id='method.parse_from_rfc3339' class="method"><span id='parse_from_rfc3339.v' class='invisible'><code>pub fn <a href='#method.parse_from_rfc3339' class='fnname'>parse_from_rfc3339</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#259-264' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Parses an RFC 3339 and ISO 8601 date and time string such as <code>1996-12-19T16:39:57-08:00</code>,
then returns a new <code>DateTime</code> with a parsed <code>FixedOffset</code>.</p>
<p>Why isn't this named <code>parse_from_iso8601</code>? That's because ISO 8601 allows some freedom
over the syntax and RFC 3339 exercises that freedom to rigidly define a fixed format.</p>
</div><h4 id='method.parse_from_str' class="method"><span id='parse_from_str.v' class='invisible'><code>pub fn <a href='#method.parse_from_str' class='fnname'>parse_from_str</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, fmt: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#286-290' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Parses a string with the specified format string and
returns a new <code>DateTime</code> with a parsed <code>FixedOffset</code>.
See the <a href="./format/strftime/index.html"><code>format::strftime</code> module</a>
on the supported escape sequences.</p>
<p>See also <code>Offset::datetime_from_str</code> which gives a local <code>DateTime</code> on specific time zone.</p>
<p>Note that this method <em>requires a timezone</em> in the string. See
<a href="./naive/struct.NaiveDateTime.html#method.parse_from_str"><code>NaiveDateTime::parse_from_str</code></a>
for a version that does not require a timezone in the to-be-parsed str.</p>
<h1 id="example-3" class="section-header"><a href="#example-3">Example</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">chrono</span>::{<span class="ident">DateTime</span>, <span class="ident">FixedOffset</span>, <span class="ident">TimeZone</span>};
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">DateTime</span>::<span class="ident">parse_from_str</span>(
<span class="string">&quot;1983 Apr 13 12:09:14.274 +0000&quot;</span>, <span class="string">&quot;%Y %b %d %H:%M:%S%.3f %z&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>, <span class="prelude-val">Ok</span>(<span class="ident">FixedOffset</span>::<span class="ident">east</span>(<span class="number">0</span>).<span class="ident">ymd</span>(<span class="number">1983</span>, <span class="number">4</span>, <span class="number">13</span>).<span class="ident">and_hms_milli</span>(<span class="number">12</span>, <span class="number">9</span>, <span class="number">14</span>, <span class="number">274</span>)));</pre>
</div></div><h3 id='impl-2' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Tz::<a class="type" href="../chrono/offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>,&nbsp;</span></code><a href='#impl-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#293-395' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.to_rfc2822' class="method"><span id='to_rfc2822.v' class='invisible'><code>pub fn <a href='#method.to_rfc2822' class='fnname'>to_rfc2822</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#295-298' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns an RFC 2822 date and time string such as <code>Tue, 1 Jul 2003 10:52:37 +0200</code>.</p>
</div><h4 id='method.to_rfc3339' class="method"><span id='to_rfc3339.v' class='invisible'><code>pub fn <a href='#method.to_rfc3339' class='fnname'>to_rfc3339</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#301-304' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns an RFC 3339 and ISO 8601 date and time string such as <code>1996-12-19T16:39:57-08:00</code>.</p>
</div><h4 id='method.to_rfc3339_opts' class="method"><span id='to_rfc3339_opts.v' class='invisible'><code>pub fn <a href='#method.to_rfc3339_opts' class='fnname'>to_rfc3339_opts</a>(&amp;self, secform: <a class="enum" href="../chrono/enum.SecondsFormat.html" title="enum chrono::SecondsFormat">SecondsFormat</a>, use_z: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#330-378' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an RFC 3339 and ISO 8601 date and time string with subseconds
formatted as per a <code>SecondsFormat</code>. If passed <code>use_z</code> true and the
timezone is UTC (offset 0), use 'Z', as per
<a href="format/enum.Fixed.html#variant.TimezoneOffsetColonZ">Fixed::TimezoneOffsetColonZ</a>.
If passed <code>use_z</code> false, use
<a href="format/enum.Fixed.html#variant.TimezoneOffsetColon">Fixed::TimezoneOffsetColon</a>.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2018</span>, <span class="number">1</span>, <span class="number">26</span>).<span class="ident">and_hms_micro</span>(<span class="number">18</span>, <span class="number">30</span>, <span class="number">9</span>, <span class="number">453_829</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat</span>::<span class="ident">Millis</span>, <span class="bool-val">false</span>),
<span class="string">&quot;2018-01-26T18:30:09.453+00:00&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat</span>::<span class="ident">Millis</span>, <span class="bool-val">true</span>),
<span class="string">&quot;2018-01-26T18:30:09.453Z&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat</span>::<span class="ident">Secs</span>, <span class="bool-val">true</span>),
<span class="string">&quot;2018-01-26T18:30:09Z&quot;</span>);
<span class="kw">let</span> <span class="ident">pst</span> <span class="op">=</span> <span class="ident">FixedOffset</span>::<span class="ident">east</span>(<span class="number">8</span> <span class="op">*</span> <span class="number">60</span> <span class="op">*</span> <span class="number">60</span>);
<span class="kw">let</span> <span class="ident">dt</span> <span class="op">=</span> <span class="ident">pst</span>.<span class="ident">ymd</span>(<span class="number">2018</span>, <span class="number">1</span>, <span class="number">26</span>).<span class="ident">and_hms_micro</span>(<span class="number">10</span>, <span class="number">30</span>, <span class="number">9</span>, <span class="number">453_829</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">dt</span>.<span class="ident">to_rfc3339_opts</span>(<span class="ident">SecondsFormat</span>::<span class="ident">Secs</span>, <span class="bool-val">true</span>),
<span class="string">&quot;2018-01-26T10:30:09+08:00&quot;</span>);</pre>
</div><h4 id='method.format_with_items' class="method"><span id='format_with_items.v' class='invisible'><code>pub fn <a href='#method.format_with_items' class='fnname'>format_with_items</a>&lt;'a, I&gt;(&amp;self, items: I) -&gt; <a class="struct" href="../chrono/format/struct.DelayedFormat.html" title="struct chrono::format::DelayedFormat">DelayedFormat</a>&lt;I&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a>&lt;Item = <a class="enum" href="../chrono/format/enum.Item.html" title="enum chrono::format::Item">Item</a>&lt;'a&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#382-386' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the combined date and time with the specified formatting items.</p>
</div><h4 id='method.format' class="method"><span id='format.v' class='invisible'><code>pub fn <a href='#method.format' class='fnname'>format</a>&lt;'a&gt;(&amp;self, fmt: &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../chrono/format/struct.DelayedFormat.html" title="struct chrono::format::DelayedFormat">DelayedFormat</a>&lt;<a class="struct" href="../chrono/format/strftime/struct.StrftimeItems.html" title="struct chrono::format::strftime::StrftimeItems">StrftimeItems</a>&lt;'a&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#392-394' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the combined date and time with the specified format string.
See the <a href="./format/strftime/index.html"><code>format::strftime</code> module</a>
on the supported escape sequences.</p>
</div></div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Add%3CFixedOffset%3E' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Add%3CFixedOffset%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/offset/fixed.rs.html#187-194' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span></h4>
<div class='docblock'><p>The resulting type after applying the <code>+</code> operator.</p>
</div><h4 id='method.add' class="method"><span id='add.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add' class='fnname'>add</a>(self, rhs: <a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/offset/fixed.rs.html#191-193' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the <code>+</code> operation.</p>
</div></div><h3 id='impl-Sub%3CFixedOffset%3E' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Sub%3CFixedOffset%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/offset/fixed.rs.html#196-203' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Output-1' class="type"><span id='Output.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span></h4>
<div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div><h4 id='method.sub' class="method"><span id='sub.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub' class='fnname'>sub</a>(self, rhs: <a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/offset/fixed.rs.html#200-202' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the <code>-</code> operation.</p>
</div></div><h3 id='impl-Serialize' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Serialize' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1291-1312' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.serialize' class="method"><span id='serialize.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a>&lt;S&gt;(&amp;self, serializer: S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;S::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, S::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1296-1311' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize into a rfc3339 time string</p>
<p>See <a href="./serde/index.html">the <code>serde</code> module</a> for alternate
serializations.</p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><span class='in-band'><code>impl&lt;'de&gt; <a class="trait" href="../serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt;</code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1338-1344' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Deserialize a value that optionally includes a timezone offset in its
string representation</p>
<p>The value to be deserialized must be an rfc3339 string.</p>
<p>See <a href="./serde/index.html">the <code>serde</code> module</a> for alternate
deserialization formats.</p>
</div><div class='impl-items'><h4 id='method.deserialize' class="method"><span id='deserialize.v' class='invisible'><code>fn <a href='../serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;D&gt;(deserializer: D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, D::<a class="type" href="../serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1339-1343' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="../serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E-1' class='impl'><span class='in-band'><code>impl&lt;'de&gt; <a class="trait" href="../serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>&gt;</code><a href='#impl-Deserialize%3C%27de%3E-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1352-1358' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Deserialize into a UTC value</p>
<p>The value to be deserialized must be an rfc3339 string.</p>
<p>See <a href="./serde/index.html">the <code>serde</code> module</a> for alternate
deserialization formats.</p>
</div><div class='impl-items'><h4 id='method.deserialize-1' class="method"><span id='deserialize.v-1' class='invisible'><code>fn <a href='../serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;D&gt;(deserializer: D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, D::<a class="type" href="../serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1353-1357' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="../serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-Deserialize%3C%27de%3E-2' class='impl'><span class='in-band'><code>impl&lt;'de&gt; <a class="trait" href="../serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>&gt;</code><a href='#impl-Deserialize%3C%27de%3E-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1368-1374' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Deserialize a value that includes no timezone in its string
representation</p>
<p>The value to be deserialized must be an rfc3339 string.</p>
<p>See <a href="./serde/index.html">the <code>serde</code> module</a> for alternate
serialization formats.</p>
</div><div class='impl-items'><h4 id='method.deserialize-2' class="method"><span id='deserialize.v-2' class='invisible'><code>fn <a href='../serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a>&lt;D&gt;(deserializer: D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, D::<a class="type" href="../serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="../serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#1369-1373' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="../serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Tz::<a class="type" href="../chrono/offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#57' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#57' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Datelike' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="../chrono/trait.Datelike.html" title="trait chrono::Datelike">Datelike</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Datelike' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#397-442' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.year' class="method"><span id='year.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.year' class='fnname'>year</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#398' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the year number in the calendar date.</p>
</div><h4 id='method.month' class="method"><span id='month.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.month' class='fnname'>month</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#399' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the month number starting from 1. <a href="../chrono/trait.Datelike.html#tymethod.month">Read more</a></p>
</div><h4 id='method.month0' class="method"><span id='month0.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.month0' class='fnname'>month0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#400' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the month number starting from 0. <a href="../chrono/trait.Datelike.html#tymethod.month0">Read more</a></p>
</div><h4 id='method.day' class="method"><span id='day.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.day' class='fnname'>day</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#401' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the day of month starting from 1. <a href="../chrono/trait.Datelike.html#tymethod.day">Read more</a></p>
</div><h4 id='method.day0' class="method"><span id='day0.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.day0' class='fnname'>day0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#402' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the day of month starting from 0. <a href="../chrono/trait.Datelike.html#tymethod.day0">Read more</a></p>
</div><h4 id='method.ordinal' class="method"><span id='ordinal.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.ordinal' class='fnname'>ordinal</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#403' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the day of year starting from 1. <a href="../chrono/trait.Datelike.html#tymethod.ordinal">Read more</a></p>
</div><h4 id='method.ordinal0' class="method"><span id='ordinal0.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.ordinal0' class='fnname'>ordinal0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#404' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the day of year starting from 0. <a href="../chrono/trait.Datelike.html#tymethod.ordinal0">Read more</a></p>
</div><h4 id='method.weekday' class="method"><span id='weekday.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.weekday' class='fnname'>weekday</a>(&amp;self) -&gt; <a class="enum" href="../chrono/enum.Weekday.html" title="enum chrono::Weekday">Weekday</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#405' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the day of week.</p>
</div><h4 id='method.iso_week' class="method"><span id='iso_week.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.iso_week' class='fnname'>iso_week</a>(&amp;self) -&gt; <a class="struct" href="../chrono/naive/struct.IsoWeek.html" title="struct chrono::naive::IsoWeek">IsoWeek</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#406' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the ISO week.</p>
</div><h4 id='method.with_year' class="method"><span id='with_year.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.with_year' class='fnname'>with_year</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#409-411' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the year number changed. <a href="../chrono/trait.Datelike.html#tymethod.with_year">Read more</a></p>
</div><h4 id='method.with_month' class="method"><span id='with_month.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.with_month' class='fnname'>with_month</a>(&amp;self, month: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#414-416' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the month number (starting from 1) changed. <a href="../chrono/trait.Datelike.html#tymethod.with_month">Read more</a></p>
</div><h4 id='method.with_month0' class="method"><span id='with_month0.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.with_month0' class='fnname'>with_month0</a>(&amp;self, month0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#419-421' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the month number (starting from 0) changed. <a href="../chrono/trait.Datelike.html#tymethod.with_month0">Read more</a></p>
</div><h4 id='method.with_day' class="method"><span id='with_day.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.with_day' class='fnname'>with_day</a>(&amp;self, day: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#424-426' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the day of month (starting from 1) changed. <a href="../chrono/trait.Datelike.html#tymethod.with_day">Read more</a></p>
</div><h4 id='method.with_day0' class="method"><span id='with_day0.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.with_day0' class='fnname'>with_day0</a>(&amp;self, day0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#429-431' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the day of month (starting from 0) changed. <a href="../chrono/trait.Datelike.html#tymethod.with_day0">Read more</a></p>
</div><h4 id='method.with_ordinal' class="method"><span id='with_ordinal.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.with_ordinal' class='fnname'>with_ordinal</a>(&amp;self, ordinal: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#434-436' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the day of year (starting from 1) changed. <a href="../chrono/trait.Datelike.html#tymethod.with_ordinal">Read more</a></p>
</div><h4 id='method.with_ordinal0' class="method"><span id='with_ordinal0.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#tymethod.with_ordinal0' class='fnname'>with_ordinal0</a>(&amp;self, ordinal0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#439-441' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the day of year (starting from 0) changed. <a href="../chrono/trait.Datelike.html#tymethod.with_ordinal0">Read more</a></p>
</div><h4 id='method.year_ce' class="method"><span id='year_ce.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#method.year_ce' class='fnname'>year_ce</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/lib.rs.html#807-814' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the absolute year number starting from 1 with a boolean flag, which is false when the year predates the epoch (BCE/BC) and true otherwise (CE/AD). <a href="../chrono/trait.Datelike.html#method.year_ce">Read more</a></p>
</div><h4 id='method.num_days_from_ce' class="method"><span id='num_days_from_ce.v' class='invisible'><code>fn <a href='../chrono/trait.Datelike.html#method.num_days_from_ce' class='fnname'>num_days_from_ce</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/lib.rs.html#897-909' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of days since January 1, Year 1 (aka Day 1) in the proleptic Gregorian calendar. <a href="../chrono/trait.Datelike.html#method.num_days_from_ce">Read more</a></p>
</div></div><h3 id='impl-Timelike' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="../chrono/trait.Timelike.html" title="trait chrono::Timelike">Timelike</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Timelike' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#444-469' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.hour' class="method"><span id='hour.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.hour' class='fnname'>hour</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#445' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the hour number from 0 to 23.</p>
</div><h4 id='method.minute' class="method"><span id='minute.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.minute' class='fnname'>minute</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#446' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the minute number from 0 to 59.</p>
</div><h4 id='method.second' class="method"><span id='second.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.second' class='fnname'>second</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#447' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the second number from 0 to 59.</p>
</div><h4 id='method.nanosecond' class="method"><span id='nanosecond.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.nanosecond' class='fnname'>nanosecond</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#448' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second. <a href="../chrono/trait.Timelike.html#tymethod.nanosecond">Read more</a></p>
</div><h4 id='method.with_hour' class="method"><span id='with_hour.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.with_hour' class='fnname'>with_hour</a>(&amp;self, hour: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#451-453' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the hour number changed. <a href="../chrono/trait.Timelike.html#tymethod.with_hour">Read more</a></p>
</div><h4 id='method.with_minute' class="method"><span id='with_minute.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.with_minute' class='fnname'>with_minute</a>(&amp;self, min: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#456-458' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the minute number changed. <a href="../chrono/trait.Timelike.html#tymethod.with_minute">Read more</a></p>
</div><h4 id='method.with_second' class="method"><span id='with_second.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.with_second' class='fnname'>with_second</a>(&amp;self, sec: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#461-463' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with the second number changed. <a href="../chrono/trait.Timelike.html#tymethod.with_second">Read more</a></p>
</div><h4 id='method.with_nanosecond' class="method"><span id='with_nanosecond.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#tymethod.with_nanosecond' class='fnname'>with_nanosecond</a>(&amp;self, nano: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#466-468' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Makes a new value with nanoseconds since the whole non-leap second changed. <a href="../chrono/trait.Timelike.html#tymethod.with_nanosecond">Read more</a></p>
</div><h4 id='method.hour12' class="method"><span id='hour12.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#method.hour12' class='fnname'>hour12</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/lib.rs.html#920-927' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the hour number from 1 to 12 with a boolean flag, which is false for AM and true for PM. <a href="../chrono/trait.Timelike.html#method.hour12">Read more</a></p>
</div><h4 id='method.num_seconds_from_midnight' class="method"><span id='num_seconds_from_midnight.v' class='invisible'><code>fn <a href='../chrono/trait.Timelike.html#method.num_seconds_from_midnight' class='fnname'>num_seconds_from_midnight</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/lib.rs.html#966-968' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the number of non-leap seconds past the last midnight.</p>
</div></div><h3 id='impl-Copy' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Tz as <a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt;::<a class="type" href="../chrono/offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,&nbsp;</span></code><a href='#impl-Copy' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#472' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-Send' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Tz as <a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt;::<a class="type" href="../chrono/offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,&nbsp;</span></code><a href='#impl-Send' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#473' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-PartialEq%3CDateTime%3CTz2%3E%3E' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>, Tz2:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz2&gt;&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-PartialEq%3CDateTime%3CTz2%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#475-477' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz2&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#476' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#479-480' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-PartialOrd' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-PartialOrd' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#482-486' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp' class="method"><span id='partial_cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#483-485' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt' class="method"><span id='lt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le' class="method"><span id='le.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt' class="method"><span id='gt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge' class="method"><span id='ge.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-Ord' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Ord' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#488-490' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.cmp' class="method"><span id='cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, other: &amp;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#489' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4 id='method.max' class="method"><span id='max.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#460-463' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4 id='method.min' class="method"><span id='min.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#476-479' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div></div><h3 id='impl-Hash' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Hash' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#492-494' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a>&lt;H:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>&gt;(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#493' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4 id='method.hash_slice' class="method"><span id='hash_slice.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#202-208' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></div><h3 id='impl-Add%3COldDuration%3E' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;<a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a>&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Add%3COldDuration%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#496-503' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Output-2' class="type"><span id='Output.t-2' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span></h4>
<div class='docblock'><p>The resulting type after applying the <code>+</code> operator.</p>
</div><h4 id='method.add-1' class="method"><span id='add.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add' class='fnname'>add</a>(self, rhs: <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#500-502' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the <code>+</code> operation.</p>
</div></div><h3 id='impl-Sub%3COldDuration%3E' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;<a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a>&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Sub%3COldDuration%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#505-512' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Output-3' class="type"><span id='Output.t-3' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span></h4>
<div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div><h4 id='method.sub-1' class="method"><span id='sub.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub' class='fnname'>sub</a>(self, rhs: <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#509-511' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the <code>-</code> operation.</p>
</div></div><h3 id='impl-Sub%3CDateTime%3CTz%3E%3E' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Sub%3CDateTime%3CTz%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#514-521' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Output-4' class="type"><span id='Output.t-4' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a></code></span></h4>
<div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div><h4 id='method.sub-2' class="method"><span id='sub.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub' class='fnname'>sub</a>(self, rhs: <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;) -&gt; <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">OldDuration</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#518-520' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the <code>-</code> operation.</p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#523-527' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#524-526' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Display' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Tz::<a class="type" href="../chrono/offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>,&nbsp;</span></code><a href='#impl-Display' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#529-533' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt-1' class="method"><span id='fmt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#530-532' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-FromStr' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt;</code><a href='#impl-FromStr' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#535-560' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Err' class="type"><span id='Err.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="struct" href="../chrono/format/struct.ParseError.html" title="struct chrono::format::ParseError">ParseError</a></code></span></h4>
<div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div><h4 id='method.from_str' class="method"><span id='from_str.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#538-559' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3 id='impl-FromStr-1' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>&gt;</code><a href='#impl-FromStr-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#562-568' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Err-1' class="type"><span id='Err.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="struct" href="../chrono/format/struct.ParseError.html" title="struct chrono::format::ParseError">ParseError</a></code></span></h4>
<div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div><h4 id='method.from_str-1' class="method"><span id='from_str.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#565-567' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3 id='impl-FromStr-2' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>&gt;</code><a href='#impl-FromStr-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#571-577' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Err-2' class="type"><span id='Err.t-2' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="struct" href="../chrono/format/struct.ParseError.html" title="struct chrono::format::ParseError">ParseError</a></code></span></h4>
<div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div><h4 id='method.from_str-2' class="method"><span id='from_str.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#574-576' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3 id='impl-From%3CSystemTime%3E' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>&gt;</code><a href='#impl-From%3CSystemTime%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#579-595' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#580-594' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CSystemTime%3E-1' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>&gt; for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>&gt;</code><a href='#impl-From%3CSystemTime%3E-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#598-602' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-1' class="method"><span id='from.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a>) -&gt; <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/struct.Local.html" title="struct chrono::offset::Local">Local</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#599-601' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CDateTime%3CTz%3E%3E' class='impl'><span class='in-band'><code>impl&lt;Tz:&nbsp;<a class="trait" href="../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;&gt; for <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a></code><a href='#impl-From%3CDateTime%3CTz%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#604-617' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-2' class="method"><span id='from.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(dt: <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html" title="struct std::time::SystemTime">SystemTime</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/chrono/datetime.rs.html#605-616' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "chrono";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>