blob: 8d457e4ae4f69d57db281ba78f288d3cd485e67a [file] [log] [blame]
<!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="The common set of methods for date component."><meta name="keywords" content="rust, rustlang, rust-lang, Datelike"><title>Datelike 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 trait"><!--[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">&#9776;</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="#">Datelike</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.day">day</a></li><li><a href="#tymethod.day0">day0</a></li><li><a href="#tymethod.iso_week">iso_week</a></li><li><a href="#tymethod.month">month</a></li><li><a href="#tymethod.month0">month0</a></li><li><a href="#tymethod.ordinal">ordinal</a></li><li><a href="#tymethod.ordinal0">ordinal0</a></li><li><a href="#tymethod.weekday">weekday</a></li><li><a href="#tymethod.with_day">with_day</a></li><li><a href="#tymethod.with_day0">with_day0</a></li><li><a href="#tymethod.with_month">with_month</a></li><li><a href="#tymethod.with_month0">with_month0</a></li><li><a href="#tymethod.with_ordinal">with_ordinal</a></li><li><a href="#tymethod.with_ordinal0">with_ordinal0</a></li><li><a href="#tymethod.with_year">with_year</a></li><li><a href="#tymethod.year">year</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.num_days_from_ce">num_days_from_ce</a></li><li><a href="#method.year_ce">year_ce</a></li></ul><h3><a href="#implementors">Implementors</a></h3></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">Trait <a href="index.html">chrono</a>::<wbr><a class="trait" href="#">Datelike</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/traits.rs.html#4-119">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Datelike: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 18 methods</span></summary> fn <a href="#tymethod.year" class="fnname">year</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.i32.html">i32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.month" class="fnname">month</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.month0" class="fnname">month0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.day" class="fnname">day</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.day0" class="fnname">day0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.ordinal" class="fnname">ordinal</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.ordinal0" class="fnname">ordinal0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.weekday" class="fnname">weekday</a>(&amp;self) -&gt; <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.iso_week" class="fnname">iso_week</a>(&amp;self) -&gt; <a class="struct" href="naive/struct.IsoWeek.html" title="struct chrono::naive::IsoWeek">IsoWeek</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.with_year" class="fnname">with_year</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.with_month" class="fnname">with_month</a>(&amp;self, month: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.with_month0" class="fnname">with_month0</a>(&amp;self, month0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.with_day" class="fnname">with_day</a>(&amp;self, day: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.with_day0" class="fnname">with_day0</a>(&amp;self, day0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.with_ordinal" class="fnname">with_ordinal</a>(&amp;self, ordinal: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.with_ordinal0" class="fnname">with_ordinal0</a>(&amp;self, ordinal0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;;
fn <a href="#method.year_ce" class="fnname">year_ce</a>(&amp;self) -&gt; (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>) { ... }
<span class="item-spacer"></span> fn <a href="#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/core/primitive.i32.html">i32</a> { ... }
</details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The common set of methods for date component.</p>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.year" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#6">source</a><h4 class="code-header">fn <a href="#tymethod.year" class="fnname">year</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Returns the year number in the <a href="./naive/struct.NaiveDate.html#calendar-date">calendar date</a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.month" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#23">source</a><h4 class="code-header">fn <a href="#tymethod.month" class="fnname">month</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the month number starting from 1.</p>
<p>The return value ranges from 1 to 12.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.month0" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#28">source</a><h4 class="code-header">fn <a href="#tymethod.month0" class="fnname">month0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the month number starting from 0.</p>
<p>The return value ranges from 0 to 11.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.day" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#33">source</a><h4 class="code-header">fn <a href="#tymethod.day" class="fnname">day</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the day of month starting from 1.</p>
<p>The return value ranges from 1 to 31. (The last day of month differs by months.)</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.day0" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#38">source</a><h4 class="code-header">fn <a href="#tymethod.day0" class="fnname">day0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the day of month starting from 0.</p>
<p>The return value ranges from 0 to 30. (The last day of month differs by months.)</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.ordinal" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#43">source</a><h4 class="code-header">fn <a href="#tymethod.ordinal" class="fnname">ordinal</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the day of year starting from 1.</p>
<p>The return value ranges from 1 to 366. (The last day of year differs by years.)</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.ordinal0" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#48">source</a><h4 class="code-header">fn <a href="#tymethod.ordinal0" class="fnname">ordinal0</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the day of year starting from 0.</p>
<p>The return value ranges from 0 to 365. (The last day of year differs by years.)</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.weekday" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#51">source</a><h4 class="code-header">fn <a href="#tymethod.weekday" class="fnname">weekday</a>(&amp;self) -&gt; <a class="enum" href="enum.Weekday.html" title="enum chrono::Weekday">Weekday</a></h4></section></summary><div class="docblock"><p>Returns the day of week.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.iso_week" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#54">source</a><h4 class="code-header">fn <a href="#tymethod.iso_week" class="fnname">iso_week</a>(&amp;self) -&gt; <a class="struct" href="naive/struct.IsoWeek.html" title="struct chrono::naive::IsoWeek">IsoWeek</a></h4></section></summary><div class="docblock"><p>Returns the ISO week.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.with_year" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#59">source</a><h4 class="code-header">fn <a href="#tymethod.with_year" class="fnname">with_year</a>(&amp;self, year: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new value with the year number changed.</p>
<p>Returns <code>None</code> when the resulting value would be invalid.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.with_month" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#64">source</a><h4 class="code-header">fn <a href="#tymethod.with_month" class="fnname">with_month</a>(&amp;self, month: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new value with the month number (starting from 1) changed.</p>
<p>Returns <code>None</code> when the resulting value would be invalid.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.with_month0" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#69">source</a><h4 class="code-header">fn <a href="#tymethod.with_month0" class="fnname">with_month0</a>(&amp;self, month0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new value with the month number (starting from 0) changed.</p>
<p>Returns <code>None</code> when the resulting value would be invalid.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.with_day" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#74">source</a><h4 class="code-header">fn <a href="#tymethod.with_day" class="fnname">with_day</a>(&amp;self, day: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new value with the day of month (starting from 1) changed.</p>
<p>Returns <code>None</code> when the resulting value would be invalid.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.with_day0" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#79">source</a><h4 class="code-header">fn <a href="#tymethod.with_day0" class="fnname">with_day0</a>(&amp;self, day0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new value with the day of month (starting from 0) changed.</p>
<p>Returns <code>None</code> when the resulting value would be invalid.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.with_ordinal" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#84">source</a><h4 class="code-header">fn <a href="#tymethod.with_ordinal" class="fnname">with_ordinal</a>(&amp;self, ordinal: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new value with the day of year (starting from 1) changed.</p>
<p>Returns <code>None</code> when the resulting value would be invalid.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.with_ordinal0" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#89">source</a><h4 class="code-header">fn <a href="#tymethod.with_ordinal0" class="fnname">with_ordinal0</a>(&amp;self, ordinal0: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/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;Self&gt;</h4></section></summary><div class="docblock"><p>Makes a new value with the day of year (starting from 0) changed.</p>
<p>Returns <code>None</code> when the resulting value would be invalid.</p>
</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.year_ce" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#11-18">source</a><h4 class="code-header">fn <a href="#method.year_ce" class="fnname">year_ce</a>(&amp;self) -&gt; (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Returns the absolute year number starting from 1 with a boolean flag,
which is false when the year predates the epoch (BCE/BC) and true otherwise (CE/AD).</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.num_days_from_ce" class="method has-srclink"><a class="srclink rightside" href="../src/chrono/traits.rs.html#103-118">source</a><h4 class="code-header">fn <a href="#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/core/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Counts the days in the proleptic Gregorian calendar, with January 1, Year 1 (CE) as day 1.</p>
<h5 id="examples"><a href="#examples">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>chrono::{NaiveDate, Datelike};
<span class="macro">assert_eq!</span>(NaiveDate::from_ymd_opt(<span class="number">1970</span>, <span class="number">1</span>, <span class="number">1</span>).unwrap().num_days_from_ce(), <span class="number">719_163</span>);
<span class="macro">assert_eq!</span>(NaiveDate::from_ymd_opt(<span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>).unwrap().num_days_from_ce(), <span class="number">366</span>);
<span class="macro">assert_eq!</span>(NaiveDate::from_ymd_opt(<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>).unwrap().num_days_from_ce(), <span class="number">1</span>);
<span class="macro">assert_eq!</span>(NaiveDate::from_ymd_opt(<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>).unwrap().num_days_from_ce(), -<span class="number">365</span>);</code></pre></div>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-Datelike-for-NaiveDate" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/naive/date.rs.html#1360-1703">source</a><a href="#impl-Datelike-for-NaiveDate" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Datelike.html" title="trait chrono::Datelike">Datelike</a> for <a class="struct" href="naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a></h3></section><section id="impl-Datelike-for-NaiveDateTime" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/naive/datetime/mod.rs.html#944-1253">source</a><a href="#impl-Datelike-for-NaiveDateTime" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Datelike.html" title="trait chrono::Datelike">Datelike</a> for <a class="struct" href="naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a></h3></section><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&lt;Tz:&nbsp;<a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <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>&lt;Tz&gt;</h3></section><section id="impl-Datelike-for-DateTime%3CTz%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/chrono/datetime/mod.rs.html#828-900">source</a><a href="#impl-Datelike-for-DateTime%3CTz%3E" class="anchor"></a><h3 class="code-header">impl&lt;Tz:&nbsp;<a class="trait" href="offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt; <a class="trait" href="trait.Datelike.html" title="trait chrono::Datelike">Datelike</a> for <a class="struct" href="struct.DateTime.html" title="struct chrono::DateTime">DateTime</a>&lt;Tz&gt;</h3></section></div><script src="../implementors/chrono/traits/trait.Datelike.js" async></script></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>