Files
google-apis-rs/chrono/struct.DateTime.html
2021-04-02 00:20:57 +08:00

269 lines
134 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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><a href='../chrono/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct DateTime</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.checked_add_signed">checked_add_signed</a><a href="#method.checked_sub_signed">checked_sub_signed</a><a href="#method.date">date</a><a href="#method.format">format</a><a href="#method.format_with_items">format_with_items</a><a href="#method.from_utc">from_utc</a><a href="#method.naive_local">naive_local</a><a href="#method.naive_utc">naive_utc</a><a href="#method.offset">offset</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.signed_duration_since">signed_duration_since</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_micros">timestamp_subsec_micros</a><a href="#method.timestamp_subsec_millis">timestamp_subsec_millis</a><a href="#method.timestamp_subsec_nanos">timestamp_subsec_nanos</a><a href="#method.timezone">timezone</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.with_timezone">with_timezone</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Add%3CDuration%3E">Add&lt;Duration&gt;</a><a href="#impl-Add%3CFixedOffset%3E">Add&lt;FixedOffset&gt;</a><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Datelike">Datelike</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Display">Display</a><a href="#impl-DurationRound">DurationRound</a><a href="#impl-Eq">Eq</a><a href="#impl-From%3CDateTime%3CFixedOffset%3E%3E">From&lt;DateTime&lt;FixedOffset&gt;&gt;</a><a href="#impl-From%3CDateTime%3CLocal%3E%3E">From&lt;DateTime&lt;Local&gt;&gt;</a><a href="#impl-From%3CDateTime%3CUtc%3E%3E">From&lt;DateTime&lt;Utc&gt;&gt;</a><a href="#impl-From%3CSystemTime%3E">From&lt;SystemTime&gt;</a><a href="#impl-FromStr">FromStr</a><a href="#impl-Hash">Hash</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CDateTime%3CTz2%3E%3E">PartialEq&lt;DateTime&lt;Tz2&gt;&gt;</a><a href="#impl-PartialOrd%3CDateTime%3CTz2%3E%3E">PartialOrd&lt;DateTime&lt;Tz2&gt;&gt;</a><a href="#impl-Send">Send</a><a href="#impl-Serialize">Serialize</a><a href="#impl-Sub%3CDateTime%3CTz%3E%3E">Sub&lt;DateTime&lt;Tz&gt;&gt;</a><a href="#impl-Sub%3CDuration%3E">Sub&lt;Duration&gt;</a><a href="#impl-Sub%3CFixedOffset%3E">Sub&lt;FixedOffset&gt;</a><a href="#impl-Timelike">Timelike</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">chrono</a></p><div id="sidebar-vars" data-name="DateTime" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></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#70-73" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><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><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="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#80-254" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from_utc" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#95-97" title="goto source code">[src]</a></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>
<div class="example-wrap"><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>
</div><h4 id="method.date" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#101-103" title="goto source code">[src]</a></h4><div class="docblock"><p>Retrieves a date component.</p>
</div><h4 id="method.time" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#108-110" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#115-117" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#139-141" title="goto source code">[src]</a></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>
<div class="example-wrap"><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>
</div><h4 id="method.timestamp_nanos" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#163-165" title="goto source code">[src]</a></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
millennia, I'm curious.)</p>
<h1 id="example-2" class="section-header"><a href="#example-2">Example</a></h1>
<div class="example-wrap"><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>
</div><h4 id="method.timestamp_subsec_millis" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#173-175" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#183-185" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#193-195" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#199-201" title="goto source code">[src]</a></h4><div class="docblock"><p>Retrieves an associated offset from UTC.</p>
</div><h4 id="method.timezone" class="method"><code>pub fn <a href="#method.timezone" class="fnname">timezone</a>(&amp;self) -&gt; Tz</code><a class="srclink" href="../src/chrono/datetime.rs.html#205-207" title="goto source code">[src]</a></h4><div class="docblock"><p>Retrieves an associated time zone.</p>
</div><h4 id="method.with_timezone" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#212-214" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#220-224" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#230-234" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#239-241" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#245-247" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a view to the naive UTC datetime.</p>
</div><h4 id="method.naive_local" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#251-253" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns a view to the naive local datetime.</p>
</div></div><h3 id="impl-1" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#333-391" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.parse_from_rfc2822" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#347-352" title="goto source code">[src]</a></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>
<p>RFC 2822 is the internet message standard that specifices the
representation of times in HTTP and email headers.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(
<span class="ident">DateTime</span>::<span class="ident">parse_from_rfc2822</span>(<span class="string">&quot;Wed, 18 Feb 2015 23:16:09 GMT&quot;</span>).<span class="ident">unwrap</span>(),
<span class="ident">FixedOffset</span>::<span class="ident">east</span>(<span class="number">0</span>).<span class="ident">ymd</span>(<span class="number">2015</span>, <span class="number">2</span>, <span class="number">18</span>).<span class="ident">and_hms</span>(<span class="number">23</span>, <span class="number">16</span>, <span class="number">9</span>)
);</pre></div>
</div><h4 id="method.parse_from_rfc3339" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#359-364" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#386-390" title="goto source code">[src]</a></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>
<div class="example-wrap"><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></div><h3 id="impl-2" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#393-533" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.to_rfc2822" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#399-402" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#406-409" title="goto source code">[src]</a></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"><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><a class="srclink" href="../src/chrono/datetime.rs.html#436-476" title="goto source code">[src]</a></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>
<div class="example-wrap"><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>
</div><h4 id="method.format_with_items" class="method"><code>pub fn <a href="#method.format_with_items" class="fnname">format_with_items</a>&lt;'a, I, B&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/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = B&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;<a class="enum" href="../chrono/format/enum.Item.html" title="enum chrono::format::Item">Item</a>&lt;'a&gt;&gt;,&nbsp;</span></code><a class="srclink" href="../src/chrono/datetime.rs.html#481-488" title="goto source code">[src]</a></h4><div class="docblock"><p>Formats the combined date and time with the specified formatting items.</p>
</div><h4 id="method.format" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#495-497" title="goto source code">[src]</a></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="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Add%3CDuration%3E" class="impl"><code class="in-band">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">Duration</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%3CDuration%3E" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#693-700" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output-4" class="type"><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></h4><div class='docblock'><p>The resulting type after applying the <code>+</code> operator.</p>
</div><h4 id="method.add-1" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#697-699" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></p>
</div></div><h3 id="impl-Add%3CFixedOffset%3E" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/offset/fixed.rs.html#200-207" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output-3" class="type"><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></h4><div class='docblock'><p>The resulting type after applying the <code>+</code> operator.</p>
</div><h4 id="method.add" class="method hidden"><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><a class="srclink" href="../src/chrono/offset/fixed.rs.html#204-206" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></p>
</div></div><h3 id="impl-Clone" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#69" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#69" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><code>pub 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 class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128" title="goto source code">[src]</a></h4><div class='docblock hidden'><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-Copy" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#649" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Datelike" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#535-607" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.year" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#537-539" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the year number in the <a href="./naive/struct.NaiveDate.html#calendar-date">calendar date</a>.</p>
</div><h4 id="method.month" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#541-543" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#549-551" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#557-559" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#561-563" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#565-567" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the day of week.</p>
</div><h4 id="method.iso_week" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#569-571" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the ISO week.</p>
</div><h4 id="method.with_year" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#574-576" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#579-581" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#584-586" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#589-591" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#594-596" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#599-601" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#604-606" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/lib.rs.html#1252-1259" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/lib.rs.html#1344-1359" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Counts the days in the proleptic Gregorian calendar, with January 1, Year 1 (CE) as day 1. <a href="../chrono/trait.Datelike.html#method.num_days_from_ce">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#720-724" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><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>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/chrono/datetime.rs.html#721-723" title="goto source code">[src]</a></h4><div class='docblock hidden'><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-Deserialize%3C%27de%3E" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#2095-2102" title="goto source code">[src]</a></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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#2096-2101" title="goto source code">[src]</a></h4><div class='docblock hidden'><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"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#2110-2117" title="goto source code">[src]</a></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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#2111-2116" title="goto source code">[src]</a></h4><div class='docblock hidden'><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"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#2127-2134" title="goto source code">[src]</a></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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#2128-2133" title="goto source code">[src]</a></h4><div class='docblock hidden'><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-Display" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#726-733" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><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>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/chrono/datetime.rs.html#730-732" title="goto source code">[src]</a></h4><div class='docblock hidden'><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-DurationRound" class="impl"><code class="in-band">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.DurationRound.html" title="trait chrono::DurationRound">DurationRound</a> for <a class="struct" href="../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</code><a href="#impl-DurationRound" class="anchor"></a><a class="srclink" href="../src/chrono/round.rs.html#149-200" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Err" class="type"><code>type <a href="../chrono/trait.DurationRound.html#associatedtype.Err" class="type">Err</a> = <a class="enum" href="../chrono/enum.RoundingError.html" title="enum chrono::RoundingError">RoundingError</a></code></h4><div class='docblock'><p>Error that can occur in rounding or truncating</p>
</div><h4 id="method.duration_round" class="method hidden"><code>fn <a href="../chrono/trait.DurationRound.html#tymethod.duration_round" class="fnname">duration_round</a>(self, duration: <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">Duration</a>) -&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, Self::<a class="type" href="../chrono/trait.DurationRound.html#associatedtype.Err" title="type chrono::DurationRound::Err">Err</a>&gt;</code><a class="srclink" href="../src/chrono/round.rs.html#152-179" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Return a copy rounded by Duration. <a href="../chrono/trait.DurationRound.html#tymethod.duration_round">Read more</a></p>
</div><h4 id="method.duration_trunc" class="method hidden"><code>fn <a href="../chrono/trait.DurationRound.html#tymethod.duration_trunc" class="fnname">duration_trunc</a>(self, duration: <a class="struct" href="../chrono/struct.Duration.html" title="struct chrono::Duration">Duration</a>) -&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, Self::<a class="type" href="../chrono/trait.DurationRound.html#associatedtype.Err" title="type chrono::DurationRound::Err">Err</a>&gt;</code><a class="srclink" href="../src/chrono/round.rs.html#181-199" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Return a copy truncated by Duration. <a href="../chrono/trait.DurationRound.html#tymethod.duration_trunc">Read more</a></p>
</div></div><h3 id="impl-Eq" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#658" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-From%3CDateTime%3CFixedOffset%3E%3E" class="impl"><code class="in-band">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="../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; 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%3CDateTime%3CFixedOffset%3E%3E" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#279-287" title="goto source code">[src]</a></h3><div class="docblock"><p>Convert a <code>DateTime&lt;FixedOffset&gt;</code> instance into a <code>DateTime&lt;Utc&gt;</code> instance.</p>
</div><div class="impl-items"><h4 id="method.from-2" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <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; Self</code><a class="srclink" href="../src/chrono/datetime.rs.html#284-286" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert this <code>DateTime&lt;FixedOffset&gt;</code> instance into a <code>DateTime&lt;Utc&gt;</code> instance.</p>
<p>Conversion is performed via <a href="../chrono/struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>, accounting for the timezone
difference.</p>
</div></div><h3 id="impl-From%3CDateTime%3CFixedOffset%3E%3E-1" class="impl"><code class="in-band">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="../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; 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%3CDateTime%3CFixedOffset%3E%3E-1" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#291-299" title="goto source code">[src]</a></h3><div class="docblock"><p>Convert a <code>DateTime&lt;FixedOffset&gt;</code> instance into a <code>DateTime&lt;Local&gt;</code> instance.</p>
</div><div class="impl-items"><h4 id="method.from-3" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <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; Self</code><a class="srclink" href="../src/chrono/datetime.rs.html#296-298" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert this <code>DateTime&lt;FixedOffset&gt;</code> instance into a <code>DateTime&lt;Local&gt;</code> instance.</p>
<p>Conversion is performed via <a href="../chrono/struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>. Returns the equivalent value in local
time.</p>
</div></div><h3 id="impl-From%3CDateTime%3CLocal%3E%3E" class="impl"><code class="in-band">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="../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; 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%3CDateTime%3CLocal%3E%3E" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#303-311" title="goto source code">[src]</a></h3><div class="docblock"><p>Convert a <code>DateTime&lt;Local&gt;</code> instance into a <code>DateTime&lt;Utc&gt;</code> instance.</p>
</div><div class="impl-items"><h4 id="method.from-4" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <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; Self</code><a class="srclink" href="../src/chrono/datetime.rs.html#308-310" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert this <code>DateTime&lt;Local&gt;</code> instance into a <code>DateTime&lt;Utc&gt;</code> instance.</p>
<p>Conversion is performed via <a href="../chrono/struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>, accounting for the difference in
timezones.</p>
</div></div><h3 id="impl-From%3CDateTime%3CLocal%3E%3E-1" class="impl"><code class="in-band">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="../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; 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-From%3CDateTime%3CLocal%3E%3E-1" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#315-323" title="goto source code">[src]</a></h3><div class="docblock"><p>Convert a <code>DateTime&lt;Local&gt;</code> instance into a <code>DateTime&lt;FixedOffset&gt;</code> instance.</p>
</div><div class="impl-items"><h4 id="method.from-5" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <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; Self</code><a class="srclink" href="../src/chrono/datetime.rs.html#320-322" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert this <code>DateTime&lt;Local&gt;</code> instance into a <code>DateTime&lt;FixedOffset&gt;</code> instance.</p>
<p>Conversion is performed via <a href="../chrono/struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>. Note that the converted value returned
by this will be created with a fixed timezone offset of 0.</p>
</div></div><h3 id="impl-From%3CDateTime%3CUtc%3E%3E" class="impl"><code class="in-band">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="../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; 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-From%3CDateTime%3CUtc%3E%3E" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#257-265" title="goto source code">[src]</a></h3><div class="docblock"><p>Convert a <code>DateTime&lt;Utc&gt;</code> instance into a <code>DateTime&lt;FixedOffset&gt;</code> instance.</p>
</div><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <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; Self</code><a class="srclink" href="../src/chrono/datetime.rs.html#262-264" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert this <code>DateTime&lt;Utc&gt;</code> instance into a <code>DateTime&lt;FixedOffset&gt;</code> instance.</p>
<p>Conversion is done via <a href="../chrono/struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>. Note that the converted value returned by
this will be created with a fixed timezone offset of 0.</p>
</div></div><h3 id="impl-From%3CDateTime%3CUtc%3E%3E-1" class="impl"><code class="in-band">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="../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; 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%3CDateTime%3CUtc%3E%3E-1" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#269-276" title="goto source code">[src]</a></h3><div class="docblock"><p>Convert a <code>DateTime&lt;Utc&gt;</code> instance into a <code>DateTime&lt;Local&gt;</code> instance.</p>
</div><div class="impl-items"><h4 id="method.from-1" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(src: <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; Self</code><a class="srclink" href="../src/chrono/datetime.rs.html#273-275" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert this <code>DateTime&lt;Utc&gt;</code> instance into a <code>DateTime&lt;Local&gt;</code> instance.</p>
<p>Conversion is performed via <a href="../chrono/struct.DateTime.html#method.with_timezone" title="DateTime::with_timezone"><code>DateTime::with_timezone</code></a>, accounting for the difference in timezones.</p>
</div></div><h3 id="impl-From%3CSystemTime%3E" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#753-770" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-6" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#754-769" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-From%3CSystemTime%3E-1" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#773-777" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-7" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#774-776" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-FromStr" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::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" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#735-741" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Err-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/str/traits/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></h4><div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div><h4 id="method.from_str" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/str/traits/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><a class="srclink" href="../src/chrono/datetime.rs.html#738-740" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3 id="impl-FromStr-1" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::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-1" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#744-750" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Err-2" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/str/traits/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></h4><div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div><h4 id="method.from_str-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/str/traits/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><a class="srclink" href="../src/chrono/datetime.rs.html#747-749" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3 id="impl-FromStr-2" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::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-2" class="anchor"></a><a class="srclink" href="../src/chrono/format/parse.rs.html#458-499" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Err-3" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/str/traits/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></h4><div class='docblock'><p>The associated error which can be returned from parsing.</p>
</div><h4 id="method.from_str-2" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/str/traits/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><a class="srclink" href="../src/chrono/format/parse.rs.html#461-498" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3 id="impl-Hash" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#687-691" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.hash" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#688-690" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <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 hidden"><code>pub 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 class="since" title="Stable since Rust version 1.3.0">1.3.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#184-186" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <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-Ord" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#681-685" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.cmp" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#682-684" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> 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 hidden"><code><span class="docblock attributes">#[must_use]</span>pub 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 class="since" title="Stable since Rust version 1.21.0">1.21.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#723-725" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><code><span class="docblock attributes">#[must_use]</span>pub 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 class="since" title="Stable since Rust version 1.21.0">1.21.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#743-745" title="goto source code">[src]</a></h4><div class='docblock hidden'><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><h4 id="method.clamp" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -&gt; Self</code><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#768-770" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
</div></div><h3 id="impl-PartialEq%3CDateTime%3CTz2%3E%3E" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#652-656" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#653-655" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><code><span class="docblock attributes">#[must_use]</span>pub 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 class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id="impl-PartialOrd%3CDateTime%3CTz2%3E%3E" class="impl"><code class="in-band">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.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</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-PartialOrd%3CDateTime%3CTz2%3E%3E" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#660-679" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.partial_cmp" class="method"><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;Tz2&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><a class="srclink" href="../src/chrono/datetime.rs.html#676-678" title="goto source code">[src]</a></h4><div class="docblock"><p>Compare two DateTimes based on their true time, ignoring time zones</p>
<h1 id="example-4" class="section-header"><a href="#example-4">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">chrono</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
<span class="kw">let</span> <span class="ident">earlier</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2015</span>, <span class="number">5</span>, <span class="number">15</span>).<span class="ident">and_hms</span>(<span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>).<span class="ident">with_timezone</span>(<span class="kw-2">&amp;</span><span class="ident">FixedOffset</span>::<span class="ident">west</span>(<span class="number">1</span> <span class="op">*</span> <span class="number">3600</span>));
<span class="kw">let</span> <span class="ident">later</span> <span class="op">=</span> <span class="ident">Utc</span>.<span class="ident">ymd</span>(<span class="number">2015</span>, <span class="number">5</span>, <span class="number">15</span>).<span class="ident">and_hms</span>(<span class="number">3</span>, <span class="number">0</span>, <span class="number">0</span>).<span class="ident">with_timezone</span>(<span class="kw-2">&amp;</span><span class="ident">FixedOffset</span>::<span class="ident">west</span>(<span class="number">5</span> <span class="op">*</span> <span class="number">3600</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">earlier</span>.<span class="ident">to_string</span>(), <span class="string">&quot;2015-05-15 01:00:00 -01:00&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">later</span>.<span class="ident">to_string</span>(), <span class="string">&quot;2015-05-14 22:00:00 -05:00&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">later</span> <span class="op">&gt;</span> <span class="ident">earlier</span>);</pre></div>
</div><h4 id="method.lt" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub 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 class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#963" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><code><span class="docblock attributes">#[must_use]</span>pub 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 class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#982" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><code><span class="docblock attributes">#[must_use]</span>pub 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 class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1000" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><code><span class="docblock attributes">#[must_use]</span>pub 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 class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1019" title="goto source code">[src]</a></h4><div class='docblock hidden'><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-Send" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#650" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Serialize" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#2047-2069" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method"><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><a class="srclink" href="../src/chrono/datetime.rs.html#2052-2068" title="goto source code">[src]</a></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-Sub%3CDateTime%3CTz%3E%3E" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#711-718" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output-2" class="type"><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></h4><div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div><h4 id="method.sub-2" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#715-717" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></p>
</div></div><h3 id="impl-Sub%3CDuration%3E" class="impl"><code class="in-band">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">Duration</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%3CDuration%3E" class="anchor"></a><a class="srclink" href="../src/chrono/datetime.rs.html#702-709" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output-1" class="type"><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></h4><div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div><h4 id="method.sub-1" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#706-708" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></p>
</div></div><h3 id="impl-Sub%3CFixedOffset%3E" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/offset/fixed.rs.html#209-216" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><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></h4><div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div><h4 id="method.sub" class="method hidden"><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><a class="srclink" href="../src/chrono/offset/fixed.rs.html#213-215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></p>
</div></div><h3 id="impl-Timelike" class="impl"><code class="in-band">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><a class="srclink" href="../src/chrono/datetime.rs.html#609-646" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.hour" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#611-613" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the hour number from 0 to 23.</p>
</div><h4 id="method.minute" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#615-617" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the minute number from 0 to 59.</p>
</div><h4 id="method.second" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#619-621" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the second number from 0 to 59.</p>
</div><h4 id="method.nanosecond" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#623-625" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 <a href="./naive/struct.NaiveTime.html#leap-second-handling">leap second</a>. <a href="../chrono/trait.Timelike.html#tymethod.nanosecond">Read more</a></p>
</div><h4 id="method.with_hour" class="method hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#628-630" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#633-635" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#638-640" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/datetime.rs.html#643-645" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/lib.rs.html#1370-1377" title="goto source code">[src]</a></h4><div class='docblock hidden'><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 hidden"><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><a class="srclink" href="../src/chrono/lib.rs.html#1416-1418" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the number of non-leap seconds past the last midnight.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl&lt;Tz&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</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/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,&nbsp;</span></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/chrono/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl&lt;Tz&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</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.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/chrono/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl&lt;Tz&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</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.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,&nbsp;</span></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/chrono/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl&lt;Tz&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</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/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/chrono/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-DeserializeOwned" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="../serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,&nbsp;</span></code><a href="#impl-DeserializeOwned" class="anchor"></a><a class="srclink" href="../src/serde/de/mod.rs.html#603" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-549" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-8" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#546" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#534-541" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#538" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <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-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&amp;self) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3 id="impl-ToString" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-ToString" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2203-2216" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.to_string" class="method hidden"><code>pub default fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</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><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2209" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#582-591" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#568-577" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#574" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="chrono"></div>
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>