title: How to get the year, month, and date component from Chrono::DateTime?
body: <p><a href="https://docs.rs/chrono/0.4.19/chrono/struct.DateTime.html" rel="nofollow noreferrer">The documentation</a> doesn't say anything about this topic. Do I need to convert it into <code>Date&lt;Tz&gt;</code>? Even then, there is no function to get the year component from it.</p>
  <pre><code>let current_date = chrono::Utc::now();
  let year = current_date.year();  //this is not working, it should output the current year with i32/usize type
  let month = current_date.month();
  let date = current_date.date();
  </code></pre>
  <pre class="lang-none prettyprint-override"><code>no method named `month` found for struct `chrono::DateTime&lt;chrono::Utc&gt;` in the current scope
  </code></pre>