| <!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="ISO 8601 calendar date with time zone."><meta name="keywords" content="rust, rustlang, rust-lang, Date"><title>Date in chrono - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../chrono/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../chrono/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Date</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.MAX_UTC">MAX_UTC</a></li><li><a href="#associatedconstant.MIN_UTC">MIN_UTC</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.and_hms">and_hms</a></li><li><a href="#method.and_hms_micro">and_hms_micro</a></li><li><a href="#method.and_hms_micro_opt">and_hms_micro_opt</a></li><li><a href="#method.and_hms_milli">and_hms_milli</a></li><li><a href="#method.and_hms_milli_opt">and_hms_milli_opt</a></li><li><a href="#method.and_hms_nano">and_hms_nano</a></li><li><a href="#method.and_hms_nano_opt">and_hms_nano_opt</a></li><li><a href="#method.and_hms_opt">and_hms_opt</a></li><li><a href="#method.and_time">and_time</a></li><li><a href="#method.checked_add_signed">checked_add_signed</a></li><li><a href="#method.checked_sub_signed">checked_sub_signed</a></li><li><a href="#method.format">format</a></li><li><a href="#method.format_with_items">format_with_items</a></li><li><a href="#method.from_utc">from_utc</a></li><li><a href="#method.naive_local">naive_local</a></li><li><a href="#method.naive_utc">naive_utc</a></li><li><a href="#method.offset">offset</a></li><li><a href="#method.pred">pred</a></li><li><a href="#method.pred_opt">pred_opt</a></li><li><a href="#method.signed_duration_since">signed_duration_since</a></li><li><a href="#method.succ">succ</a></li><li><a href="#method.succ_opt">succ_opt</a></li><li><a href="#method.timezone">timezone</a></li><li><a href="#method.with_timezone">with_timezone</a></li><li><a href="#method.years_since">years_since</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Add%3CDuration%3E-for-Date%3CTz%3E">Add<Duration></a></li><li><a href="#impl-AddAssign%3CDuration%3E-for-Date%3CTz%3E">AddAssign<Duration></a></li><li><a href="#impl-Clone-for-Date%3CTz%3E">Clone</a></li><li><a href="#impl-Copy-for-Date%3CTz%3E">Copy</a></li><li><a href="#impl-Datelike-for-Date%3CTz%3E">Datelike</a></li><li><a href="#impl-Debug-for-Date%3CTz%3E">Debug</a></li><li><a href="#impl-Display-for-Date%3CTz%3E">Display</a></li><li><a href="#impl-Eq-for-Date%3CTz%3E">Eq</a></li><li><a href="#impl-Hash-for-Date%3CTz%3E">Hash</a></li><li><a href="#impl-Ord-for-Date%3CTz%3E">Ord</a></li><li><a href="#impl-PartialEq%3CDate%3CTz2%3E%3E-for-Date%3CTz%3E">PartialEq<Date<Tz2>></a></li><li><a href="#impl-PartialOrd%3CDate%3CTz%3E%3E-for-Date%3CTz%3E">PartialOrd<Date<Tz>></a></li><li><a href="#impl-Send-for-Date%3CTz%3E">Send</a></li><li><a href="#impl-Sub%3CDate%3CTz%3E%3E-for-Date%3CTz%3E">Sub<Date<Tz>></a></li><li><a href="#impl-Sub%3CDuration%3E-for-Date%3CTz%3E">Sub<Duration></a></li><li><a href="#impl-SubAssign%3CDuration%3E-for-Date%3CTz%3E">SubAssign<Duration></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Date%3CTz%3E">RefUnwindSafe</a></li><li><a href="#impl-Sync-for-Date%3CTz%3E">Sync</a></li><li><a href="#impl-Unpin-for-Date%3CTz%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Date%3CTz%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Date%3CTz%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Date%3CTz%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Date%3CTz%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Date%3CTz%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Date%3CTz%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-Date%3CTz%3E">ToOwned</a></li><li><a href="#impl-ToString-for-Date%3CTz%3E">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Date%3CTz%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Date%3CTz%3E">TryInto<U></a></li></ul></section><h2><a href="index.html">In chrono</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="index.html">chrono</a>::<wbr><a class="struct" href="#">Date</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/chrono/date.rs.html#60-63">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Date<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> { /* private fields */ }</code></pre></div><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: Use <code>NaiveDate</code> or <code>DateTime<Tz></code> instead</span></div></span><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>ISO 8601 calendar date with time zone.</p> |
| <p>You almost certainly want to be using a <a href="naive/struct.NaiveDate.html" title="NaiveDate"><code>NaiveDate</code></a> instead of this type.</p> |
| <p>This type primarily exists to aid in the construction of DateTimes that |
| have a timezone by way of the <a href="offset/trait.TimeZone.html" title="TimeZone"><code>TimeZone</code></a> datelike constructors (e.g. |
| <a href="offset/trait.TimeZone.html#method.ymd" title="TimeZone::ymd"><code>TimeZone::ymd</code></a>).</p> |
| <p>This type should be considered ambiguous at best, due to the inherent lack |
| of precision required for the time zone resolution.</p> |
| <p>There are some guarantees on the usage of <code>Date<Tz></code>:</p> |
| <ul> |
| <li> |
| <p>If properly constructed via <a href="offset/trait.TimeZone.html#method.ymd" title="TimeZone::ymd"><code>TimeZone::ymd</code></a> and others without an error, |
| the corresponding local date should exist for at least a moment. |
| (It may still have a gap from the offset changes.)</p> |
| </li> |
| <li> |
| <p>The <code>TimeZone</code> is free to assign <em>any</em> <a href="offset/trait.Offset.html"><code>Offset</code></a> to the |
| local date, as long as that offset did occur in given day.</p> |
| <p>For example, if <code>2015-03-08T01:59-08:00</code> is followed by <code>2015-03-08T03:00-07:00</code>, |
| it may produce either <code>2015-03-08-08:00</code> or <code>2015-03-08-07:00</code> |
| but <em>not</em> <code>2015-03-08+00:00</code> and others.</p> |
| </li> |
| <li> |
| <p>Once constructed as a full <code>DateTime</code>, <a href="struct.DateTime.html#method.date" title="DateTime::date"><code>DateTime::date</code></a> and other associated |
| methods should return those for the original <code>Date</code>. For example, if <code>dt = tz.ymd_opt(y,m,d).unwrap().hms(h,n,s)</code> were valid, <code>dt.date() == tz.ymd_opt(y,m,d).unwrap()</code>.</p> |
| </li> |
| <li> |
| <p>The date is timezone-agnostic up to one day (i.e. practically always), |
| so the local date and UTC date should be equal for most cases |
| even though the raw calculation between <code>NaiveDate</code> and <code>Duration</code> may not.</p> |
| </li> |
| </ul> |
| </div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#74-323">source</a><a href="#impl-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_utc" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#81-83">source</a><h4 class="code-header">pub fn <a href="#method.from_utc" class="fnname">from_utc</a>(date: <a class="struct" href="naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>, offset: Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section></summary><div class="docblock"><p>Makes a new <code>Date</code> with given <em>UTC</em> date and offset. |
| The local date should be constructed via the <code>TimeZone</code> trait.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_time" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#91-94">source</a><h4 class="code-header">pub fn <a href="#method.and_time" class="fnname">and_time</a>(&self, time: <a class="struct" href="naive/struct.NaiveTime.html" title="struct chrono::naive::NaiveTime">NaiveTime</a>) -> Option<<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date and given <code>NaiveTime</code>. |
| The offset in the current date is preserved.</p> |
| <p>Panics on invalid datetime.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#103-105">source</a><h4 class="code-header">pub fn <a href="#method.and_hms" class="fnname">and_hms</a>(&self, hour: u32, min: u32, sec: u32) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: Use and_hms_opt() instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute and second. |
| The offset in the current date is preserved.</p> |
| <p>Panics on invalid hour, minute and/or second.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms_opt" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#113-115">source</a><h4 class="code-header">pub fn <a href="#method.and_hms_opt" class="fnname">and_hms_opt</a>(&self, hour: u32, min: u32, sec: u32) -> Option<<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute and second. |
| The offset in the current date is preserved.</p> |
| <p>Returns <code>None</code> on invalid hour, minute and/or second.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms_milli" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#125-127">source</a><h4 class="code-header">pub fn <a href="#method.and_hms_milli" class="fnname">and_hms_milli</a>(<br> &self,<br> hour: u32,<br> min: u32,<br> sec: u32,<br> milli: u32<br>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: Use and_hms_milli_opt() instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute, second and millisecond. |
| The millisecond part can exceed 1,000 in order to represent the leap second. |
| The offset in the current date is preserved.</p> |
| <p>Panics on invalid hour, minute, second and/or millisecond.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms_milli_opt" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#136-144">source</a><h4 class="code-header">pub fn <a href="#method.and_hms_milli_opt" class="fnname">and_hms_milli_opt</a>(<br> &self,<br> hour: u32,<br> min: u32,<br> sec: u32,<br> milli: u32<br>) -> Option<<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute, second and millisecond. |
| The millisecond part can exceed 1,000 in order to represent the leap second. |
| The offset in the current date is preserved.</p> |
| <p>Returns <code>None</code> on invalid hour, minute, second and/or millisecond.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms_micro" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#154-156">source</a><h4 class="code-header">pub fn <a href="#method.and_hms_micro" class="fnname">and_hms_micro</a>(<br> &self,<br> hour: u32,<br> min: u32,<br> sec: u32,<br> micro: u32<br>) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: Use and_hms_micro_opt() instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute, second and microsecond. |
| The microsecond part can exceed 1,000,000 in order to represent the leap second. |
| The offset in the current date is preserved.</p> |
| <p>Panics on invalid hour, minute, second and/or microsecond.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms_micro_opt" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#165-173">source</a><h4 class="code-header">pub fn <a href="#method.and_hms_micro_opt" class="fnname">and_hms_micro_opt</a>(<br> &self,<br> hour: u32,<br> min: u32,<br> sec: u32,<br> micro: u32<br>) -> Option<<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute, second and microsecond. |
| The microsecond part can exceed 1,000,000 in order to represent the leap second. |
| The offset in the current date is preserved.</p> |
| <p>Returns <code>None</code> on invalid hour, minute, second and/or microsecond.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms_nano" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#183-185">source</a><h4 class="code-header">pub fn <a href="#method.and_hms_nano" class="fnname">and_hms_nano</a>(&self, hour: u32, min: u32, sec: u32, nano: u32) -> <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: Use and_hms_nano_opt() instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute, second and nanosecond. |
| The nanosecond part can exceed 1,000,000,000 in order to represent the leap second. |
| The offset in the current date is preserved.</p> |
| <p>Panics on invalid hour, minute, second and/or nanosecond.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.and_hms_nano_opt" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#194-202">source</a><h4 class="code-header">pub fn <a href="#method.and_hms_nano_opt" class="fnname">and_hms_nano_opt</a>(<br> &self,<br> hour: u32,<br> min: u32,<br> sec: u32,<br> nano: u32<br>) -> Option<<a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></h4></section></summary><div class="docblock"><p>Makes a new <code>DateTime</code> from the current date, hour, minute, second and nanosecond. |
| The nanosecond part can exceed 1,000,000,000 in order to represent the leap second. |
| The offset in the current date is preserved.</p> |
| <p>Returns <code>None</code> on invalid hour, minute, second and/or nanosecond.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.succ" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#210-212">source</a><h4 class="code-header">pub fn <a href="#method.succ" class="fnname">succ</a>(&self) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: Use succ_opt() instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> for the next date.</p> |
| <p>Panics when <code>self</code> is the last representable date.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.succ_opt" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#219-221">source</a><h4 class="code-header">pub fn <a href="#method.succ_opt" class="fnname">succ_opt</a>(&self) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class="docblock"><p>Makes a new <code>Date</code> for the next date.</p> |
| <p>Returns <code>None</code> when <code>self</code> is the last representable date.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pred" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#229-231">source</a><h4 class="code-header">pub fn <a href="#method.pred" class="fnname">pred</a>(&self) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.4.23: Use pred_opt() instead</span></div></span></summary><div class="docblock"><p>Makes a new <code>Date</code> for the prior date.</p> |
| <p>Panics when <code>self</code> is the first representable date.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pred_opt" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#238-240">source</a><h4 class="code-header">pub fn <a href="#method.pred_opt" class="fnname">pred_opt</a>(&self) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class="docblock"><p>Makes a new <code>Date</code> for the prior date.</p> |
| <p>Returns <code>None</code> when <code>self</code> is the first representable date.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.offset" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#245-247">source</a><h4 class="code-header">pub fn <a href="#method.offset" class="fnname">offset</a>(&self) -> &Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Retrieves an associated offset from UTC.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.timezone" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#252-254">source</a><h4 class="code-header">pub fn <a href="#method.timezone" class="fnname">timezone</a>(&self) -> Tz</h4></section></summary><div class="docblock"><p>Retrieves an associated time zone.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_timezone" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#260-262">source</a><h4 class="code-header">pub fn <a href="#method.with_timezone" class="fnname">with_timezone</a><Tz2: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>(&self, tz: &Tz2) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz2></h4></section></summary><div class="docblock"><p>Changes the associated time zone. |
| This does not change the actual <code>Date</code> (but will change the string representation).</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_add_signed" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#269-272">source</a><h4 class="code-header">pub fn <a href="#method.checked_add_signed" class="fnname">checked_add_signed</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class="docblock"><p>Adds given <code>Duration</code> to the current date.</p> |
| <p>Returns <code>None</code> when it will result in overflow.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_sub_signed" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#279-282">source</a><h4 class="code-header">pub fn <a href="#method.checked_sub_signed" class="fnname">checked_sub_signed</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class="docblock"><p>Subtracts given <code>Duration</code> from the current date.</p> |
| <p>Returns <code>None</code> when it will result in overflow.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.signed_duration_since" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#291-293">source</a><h4 class="code-header">pub fn <a href="#method.signed_duration_since" class="fnname">signed_duration_since</a><Tz2: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>(self, rhs: <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz2>) -> <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a></h4></section></summary><div class="docblock"><p>Subtracts another <code>Date</code> from the current date. |
| Returns a <code>Duration</code> of integral numbers.</p> |
| <p>This does not overflow or underflow at all, |
| as all possible output fits in the range of <code>Duration</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.naive_utc" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#298-300">source</a><h4 class="code-header">pub fn <a href="#method.naive_utc" class="fnname">naive_utc</a>(&self) -> <a class="struct" href="naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a></h4></section></summary><div class="docblock"><p>Returns a view to the naive UTC date.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.naive_local" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#309-311">source</a><h4 class="code-header">pub fn <a href="#method.naive_local" class="fnname">naive_local</a>(&self) -> <a class="struct" href="naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a></h4></section></summary><div class="docblock"><p>Returns a view to the naive local date.</p> |
| <p>This is technically the same as <a href="#method.naive_utc"><code>naive_utc</code></a> |
| because the offset is restricted to never exceed one day, |
| but provided for the consistency.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.years_since" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#315-317">source</a><h4 class="code-header">pub fn <a href="#method.years_since" class="fnname">years_since</a>(&self, base: Self) -> Option<u32></h4></section></summary><div class="docblock"><p>Returns the number of whole years from the given <code>base</code> until <code>self</code>.</p> |
| </div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.MIN_UTC" class="associatedconstant has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#320">source</a><h4 class="code-header">pub const <a href="#associatedconstant.MIN_UTC" class="constant">MIN_UTC</a>: <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>> = _</h4></section></summary><div class="docblock"><p>The minimum possible <code>Date</code>.</p> |
| </div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.MAX_UTC" class="associatedconstant has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#322">source</a><h4 class="code-header">pub const <a href="#associatedconstant.MAX_UTC" class="constant">MAX_UTC</a>: <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><<a class="struct" href="offset/struct.Utc.html" title="struct chrono::offset::Utc">Utc</a>> = _</h4></section></summary><div class="docblock"><p>The maximum possible <code>Date</code>.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Date%3CTz%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#333-398">source</a><a href="#impl-Date%3CTz%3E-1" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: Display,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.format_with_items" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#342-348">source</a><h4 class="code-header">pub fn <a href="#method.format_with_items" class="fnname">format_with_items</a><'a, I, B>(&self, items: I) -> <a class="struct" href="format/struct.DelayedFormat.html" title="struct chrono::format::DelayedFormat">DelayedFormat</a><I><span class="where fmt-newline">where<br> I: Iterator<Item = B> + Clone,<br> B: Borrow<<a class="enum" href="format/enum.Item.html" title="enum chrono::format::Item">Item</a><'a>>,</span></h4></section></summary><div class="docblock"><p>Formats the date with the specified formatting items.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.format" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#357-359">source</a><h4 class="code-header">pub fn <a href="#method.format" class="fnname">format</a><'a>(&self, fmt: &'a str) -> <a class="struct" href="format/struct.DelayedFormat.html" title="struct chrono::format::DelayedFormat">DelayedFormat</a><<a class="struct" href="format/strftime/struct.StrftimeItems.html" title="struct chrono::format::strftime::StrftimeItems">StrftimeItems</a><'a>></h4></section></summary><div class="docblock"><p>Formats the date with the specified format string. |
| See the <a href="format/strftime/index.html" title="crate::format::strftime"><code>crate::format::strftime</code></a> module |
| on the supported escape sequences.</p> |
| </div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3CDuration%3E-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#504-511">source</a><a href="#impl-Add%3CDuration%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Add<<a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#508-510">source</a><a href="#method.add" class="anchor"></a><h4 class="code-header">fn <a class="fnname">add</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AddAssign%3CDuration%3E-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#513-518">source</a><a href="#impl-AddAssign%3CDuration%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> AddAssign<<a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_assign" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#515-517">source</a><a href="#method.add_assign" class="anchor"></a><h4 class="code-header">fn <a class="fnname">add_assign</a>(&mut self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>)</h4></section></summary><div class='docblock'>Performs the <code>+=</code> operation. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#58">source</a><a href="#impl-Clone-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: Clone + <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Clone for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: Clone,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#58">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section></summary><div class='docblock'>Returns a copy of the value. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">clone_from</a>(&mut self, source: &Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Datelike-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#400-472">source</a><a href="#impl-Datelike-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> <a class="trait" href="trait.Datelike.html" title="trait chrono::Datelike">Datelike</a> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.year" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#402-404">source</a><a href="#method.year" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.year" class="fnname">year</a>(&self) -> i32</h4></section></summary><div class='docblock'>Returns the year number in the <a href="./naive/struct.NaiveDate.html#calendar-date">calendar date</a>.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.month" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#406-408">source</a><a href="#method.month" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.month" class="fnname">month</a>(&self) -> u32</h4></section></summary><div class='docblock'>Returns the month number starting from 1. <a href="trait.Datelike.html#tymethod.month">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.month0" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#410-412">source</a><a href="#method.month0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.month0" class="fnname">month0</a>(&self) -> u32</h4></section></summary><div class='docblock'>Returns the month number starting from 0. <a href="trait.Datelike.html#tymethod.month0">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.day" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#414-416">source</a><a href="#method.day" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.day" class="fnname">day</a>(&self) -> u32</h4></section></summary><div class='docblock'>Returns the day of month starting from 1. <a href="trait.Datelike.html#tymethod.day">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.day0" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#418-420">source</a><a href="#method.day0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.day0" class="fnname">day0</a>(&self) -> u32</h4></section></summary><div class='docblock'>Returns the day of month starting from 0. <a href="trait.Datelike.html#tymethod.day0">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ordinal" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#422-424">source</a><a href="#method.ordinal" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.ordinal" class="fnname">ordinal</a>(&self) -> u32</h4></section></summary><div class='docblock'>Returns the day of year starting from 1. <a href="trait.Datelike.html#tymethod.ordinal">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ordinal0" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#426-428">source</a><a href="#method.ordinal0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.ordinal0" class="fnname">ordinal0</a>(&self) -> u32</h4></section></summary><div class='docblock'>Returns the day of year starting from 0. <a href="trait.Datelike.html#tymethod.ordinal0">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.weekday" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#430-432">source</a><a href="#method.weekday" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.weekday" class="fnname">weekday</a>(&self) -> <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a></h4></section></summary><div class='docblock'>Returns the day of week.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iso_week" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#434-436">source</a><a href="#method.iso_week" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.iso_week" class="fnname">iso_week</a>(&self) -> <a class="struct" href="naive/struct.IsoWeek.html" title="struct chrono::naive::IsoWeek">IsoWeek</a></h4></section></summary><div class='docblock'>Returns the ISO week.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_year" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#439-441">source</a><a href="#method.with_year" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_year" class="fnname">with_year</a>(&self, year: i32) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class='docblock'>Makes a new value with the year number changed. <a href="trait.Datelike.html#tymethod.with_year">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_month" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#444-446">source</a><a href="#method.with_month" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_month" class="fnname">with_month</a>(&self, month: u32) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class='docblock'>Makes a new value with the month number (starting from 1) changed. <a href="trait.Datelike.html#tymethod.with_month">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_month0" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#449-451">source</a><a href="#method.with_month0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_month0" class="fnname">with_month0</a>(&self, month0: u32) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class='docblock'>Makes a new value with the month number (starting from 0) changed. <a href="trait.Datelike.html#tymethod.with_month0">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_day" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#454-456">source</a><a href="#method.with_day" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_day" class="fnname">with_day</a>(&self, day: u32) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class='docblock'>Makes a new value with the day of month (starting from 1) changed. <a href="trait.Datelike.html#tymethod.with_day">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_day0" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#459-461">source</a><a href="#method.with_day0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_day0" class="fnname">with_day0</a>(&self, day0: u32) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class='docblock'>Makes a new value with the day of month (starting from 0) changed. <a href="trait.Datelike.html#tymethod.with_day0">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_ordinal" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#464-466">source</a><a href="#method.with_ordinal" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_ordinal" class="fnname">with_ordinal</a>(&self, ordinal: u32) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class='docblock'>Makes a new value with the day of year (starting from 1) changed. <a href="trait.Datelike.html#tymethod.with_ordinal">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_ordinal0" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#469-471">source</a><a href="#method.with_ordinal0" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#tymethod.with_ordinal0" class="fnname">with_ordinal0</a>(&self, ordinal0: u32) -> Option<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>></h4></section></summary><div class='docblock'>Makes a new value with the day of year (starting from 0) changed. <a href="trait.Datelike.html#tymethod.with_ordinal0">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.year_ce" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#11-18">source</a><a href="#method.year_ce" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#method.year_ce" class="fnname">year_ce</a>(&self) -> (bool, u32)</h4></section></summary><div class='docblock'>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="trait.Datelike.html#method.year_ce">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.num_days_from_ce" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#103-118">source</a><a href="#method.num_days_from_ce" class="anchor"></a><h4 class="code-header">fn <a href="trait.Datelike.html#method.num_days_from_ce" class="fnname">num_days_from_ce</a>(&self) -> i32</h4></section></summary><div class='docblock'>Counts the days in the proleptic Gregorian calendar, with January 1, Year 1 (CE) as day 1. <a href="trait.Datelike.html#method.num_days_from_ce">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#545-550">source</a><a href="#impl-Debug-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Debug for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#546-549">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a class="fnname">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#552-560">source</a><a href="#impl-Display-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Display for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> Tz::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: Display,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#556-559">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Hash-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#498-502">source</a><a href="#impl-Hash-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Hash for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#499-501">source</a><a href="#method.hash" class="anchor"></a><h4 class="code-header">fn <a class="fnname">hash</a><H: Hasher>(&self, state: &mut H)</h4></section></summary><div class='docblock'>Feeds this value into the given [<code>Hasher</code>]. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.3.0">1.3.0</span><a href="#method.hash_slice" class="anchor"></a><h4 class="code-header">fn <a class="fnname">hash_slice</a><H>(data: &[Self], state: &mut H)<span class="where fmt-newline">where<br> H: Hasher,</span></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given [<code>Hasher</code>]. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#492-496">source</a><a href="#impl-Ord-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Ord for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#493-495">source</a><a href="#method.cmp" class="anchor"></a><h4 class="code-header">fn <a class="fnname">cmp</a>(&self, other: &<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>) -> Ordering</h4></section></summary><div class='docblock'>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.21.0">1.21.0</span><a href="#method.max" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">max</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.21.0">1.21.0</span><a href="#method.min" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">min</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.50.0">1.50.0</span><a href="#method.clamp" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">clamp</a>(self, min: Self, max: Self) -> Self<span class="where fmt-newline">where<br> Self: PartialOrd<Self>,</span></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CDate%3CTz2%3E%3E-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#478-482">source</a><a href="#impl-PartialEq%3CDate%3CTz2%3E%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>, Tz2: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> PartialEq<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz2>> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#479-481">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz2>) -> bool</h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used |
| by <code>==</code>. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ne" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">ne</a>(&self, other: &Rhs) -> bool</h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always |
| sufficient, and should not be overridden without very good reason. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CDate%3CTz%3E%3E-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#486-490">source</a><a href="#impl-PartialOrd%3CDate%3CTz%3E%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> PartialOrd<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#487-489">source</a><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a class="fnname">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>) -> Option<Ordering></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.lt" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">lt</a>(&self, other: &Rhs) -> bool</h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.le" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">le</a>(&self, other: &Rhs) -> bool</h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> |
| operator. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.gt" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">gt</a>(&self, other: &Rhs) -> bool</h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ge" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">ge</a>(&self, other: &Rhs) -> bool</h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> |
| operator. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3CDate%3CTz%3E%3E-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#536-543">source</a><a href="#impl-Sub%3CDate%3CTz%3E%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Sub<<a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-2" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#540-542">source</a><a href="#method.sub-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">sub</a>(self, rhs: <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz>) -> <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3CDuration%3E-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#520-527">source</a><a href="#impl-Sub%3CDuration%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Sub<<a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-1" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#524-526">source</a><a href="#method.sub" class="anchor"></a><h4 class="code-header">fn <a class="fnname">sub</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>) -> <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-SubAssign%3CDuration%3E-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#529-534">source</a><a href="#impl-SubAssign%3CDuration%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> SubAssign<<a class="struct" href="struct.Duration.html" title="struct chrono::Duration">Duration</a>> for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub_assign" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#531-533">source</a><a href="#method.sub_assign" class="anchor"></a><h4 class="code-header">fn <a class="fnname">sub_assign</a>(&mut self, rhs: <a class="struct" href="struct.Duration.html" title="struct chrono::Duration">OldDuration</a>)</h4></section></summary><div class='docblock'>Performs the <code>-=</code> operation. <a>Read more</a></div></details></div></details><section id="impl-Copy-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#475">source</a><a href="#impl-Copy-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Copy for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: Copy,</span></h3></section><section id="impl-Eq-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#484">source</a><a href="#impl-Eq-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Eq for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz></h3></section><section id="impl-Send-for-Date%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/date.rs.html#476">source</a><a href="#impl-Send-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz: <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>> Send for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: Send,</span></h3></section></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"><section id="impl-RefUnwindSafe-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz> RefUnwindSafe for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: RefUnwindSafe,</span></h3></section><section id="impl-Sync-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-Sync-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz> Sync for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: Sync,</span></h3></section><section id="impl-Unpin-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz> Unpin for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: Unpin,</span></h3></section><section id="impl-UnwindSafe-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<Tz> UnwindSafe for <a class="struct" href="struct.Date.html" title="struct chrono::Date">Date</a><Tz><span class="where fmt-newline">where<br> <Tz as <a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>::<a class="associatedtype" href="offset/trait.TimeZone.html#associatedtype.Offset" title="type chrono::offset::TimeZone::Offset">Offset</a>: UnwindSafe,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-Any-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T> Any for T<span class="where fmt-newline">where<br> T: 'static + ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a class="fnname">type_id</a>(&self) -> TypeId</h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-Borrow%3CT%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T> Borrow<T> for T<span class="where fmt-newline">where<br> T: ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a class="fnname">borrow</a>(&self) -> &T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-BorrowMut%3CT%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T> BorrowMut<T> for T<span class="where fmt-newline">where<br> T: ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a class="fnname">borrow_mut</a>(&mut self) -> &mut T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-From%3CT%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T> From<T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-Into%3CU%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T, U> Into<U> for T<span class="where fmt-newline">where<br> U: From<T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> |
| <p>That is, this conversion is whatever the implementation of |
| <code>[From]<T> for U</code> chooses to do.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-ToOwned-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T> ToOwned for T<span class="where fmt-newline">where<br> T: Clone,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">clone_into</a>(&self, target: &mut T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-ToString-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T> ToString for T<span class="where fmt-newline">where<br> T: Display + ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a class="fnname">to_string</a>(&self) -> String</h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-TryFrom%3CU%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T, U> TryFrom<U> for T<span class="where fmt-newline">where<br> U: Into<T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Error</a> = Infallible</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a class="fnname">try_from</a>(value: U) -> Result<T, <T as TryFrom<U>>::Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Date%3CTz%3E" class="impl has-srclink"><a href="#impl-TryInto%3CU%3E-for-Date%3CTz%3E" class="anchor"></a><h3 class="code-header">impl<T, U> TryInto<U> for T<span class="where fmt-newline">where<br> U: TryFrom<T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Error</a> = <U as TryFrom<T>>::Error</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">try_into</a>(self) -> Result<U, <U as TryFrom<T>>::Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="chrono" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |