Rusted days - a WolframAlfa port I wrote a silly Rust program inspired by a WolframAlpha query. I know, that's nothing serious, but if there's anything that could be made more, well, proper Rust-like, I'd love to know! Of course, general feedback is welcomed too.
For starters, here's my Cargo.toml:
[package]
name = &quot;rusted-days&quot;
version = &quot;0.1.0&quot;
authors = [&quot;baduker&quot;]
edition = &quot;2018&quot;

[dependencies]
chrono = &quot;0.4.19&quot;

And the code:
use std::io;
use std::io::Write;
use chrono::{NaiveDateTime, DateTime, Utc, Datelike};

fn main() {
    let prompt = &quot;What's your date (DD/MM/YYYY)?: &quot;;
    let date = input(prompt).expect(&quot;Something went wrong! o.O&quot;);
    show_interpretation(parse_date(date));
}

fn input(user_input: &amp;str) -&gt; io::Result&lt;String&gt; {
    print!(&quot;{}&quot;, user_input);
    io::stdout().flush()?;

    let mut buffer: String = String::new();
    io::stdin().read_line(&amp;mut buffer)?;

    Ok(buffer.trim_end().to_owned())
}

fn parse_date(date: String) -&gt; DateTime&lt;Utc&gt; {
    let naive_date = chrono::NaiveDate::parse_from_str(
        date.as_str(), &quot;%d/%m/%Y&quot;
    ).unwrap();

    let naive_datetime: NaiveDateTime = naive_date
        .and_hms(0, 0, 0);

    DateTime::&lt;Utc&gt;::from_utc(naive_datetime, Utc)
}

fn show_interpretation(date: DateTime&lt;Utc&gt;) {
    println!(&quot;Input interpretation: days since {}&quot;, date.format(&quot;%A, %B %d, %Y&quot;));

    let total_days = Utc::now() - date;
    println!(&quot;Result:\n{} days have rusted away ¯\\_(ツ)_/¯&quot;, total_days.num_days());

    let years = Utc::now().year() - date.year();
    let months = Utc::now().month() - date.month();
    let days = Utc::now().day() - date.day();

    println!(&quot;Timespan:\n{} year(s), {} month(s), {} day(s)&quot;, years, months, days);
    println!(&quot;{} weeks&quot;, total_days.num_weeks());
    println!(&quot;{:.2} years&quot;, total_days.num_days() as f32 / 365_f32);
}

A sample output (you should get):
What's your date (DD/MM/YYYY): 01/01/1970
Input interpretation: days since Thursday, January 01, 1970
Result:
18567 days have rusted away ¯\_(ツ)_/¯
Timespan:
50 years, 10 month(s), 0 days
2652 weeks
50.87 years
I can't see any issues in terms of making your code idiomatic; it looks very Rust-like! I did however notice a problem with your code's logic.
Integer overflow
I tried inputting 31/12/2019 and obtained a panic when I ran it today (07/11/2020). This was because Utc::now().month() is a u32 equal to 11, and the code attempts to subtract 12:
let months = Utc::now().month() - date.month();

This leads to an overflow because we're using unsigned integers. The same story applies for the day, which is also a u32, but not the year, which is an i32 and so functions fine.
Even if we convert the relevant types to signed integers, the following isn't what you mean:
let years = Utc::now().year() - date.year();

This would tell you that 31/12/2019 and 1/1/2020 are a year apart, when in fact this isn't true. Even dividing the number of days by 365 isn't quite right because of leap years.
Making the date logic work correctly is a lot more frustrating than it sounds: the number of months passed depends on the length of each month as well as the Duration instance. That's why Duration doesn't implement anything beyond num_weeks(): it's simply a difference between two dates, so it doesn't know how to account for the varying month lengths.