Skip to content
View fjsnow's full-sized avatar

Highlights

  • Pro

Block or report fjsnow

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
fjsnow/README.md
fj@github:~$ cargo run
hi! i'm fred (he/him) ๐Ÿ‘‹
20 y/o aspiring developer from England, United Kingdom

check out my site @ https://freddysnow.com :)
fj@github:~$ cat src/main.rs
use chrono::{NaiveDate, TimeZone, Utc};

struct Human {
    name: String,
    pronouns: String,
    dob: NaiveDate,
    location: String,
    domain: String,
}

impl Human {
    fn calculate_age(&self) -> u32 {
        let today = Utc::now();
        today
            .years_since(Utc.from_utc_date(&self.dob).and_hms_opt(0, 0, 0).unwrap())
            .unwrap()
    }
}

fn main() {
    let fred = Human {
        name: "fred".to_string(),
        pronouns: "he/him".to_string(),
        dob: NaiveDate::from_ymd_opt(2004, 12, 03).unwrap(),
        location: "England, United Kingdom".to_string(),
        domain: "freddysnow.com".to_string(),
    };

    println!("hi! i'm {} ({}) ๐Ÿ‘‹", fred.name, fred.pronouns);
    println!(
        "{} y/o aspiring developer from {}",
        fred.calculate_age(),
        fred.location
    );
    println!("\ncheck out my site @ https://{} :)", fred.domain);
}

Popular repositories Loading

  1. aoc-2024 aoc-2024 Public

    Python 1

  2. fjsnow fjsnow Public

  3. me me Public

    TypeScript

  4. tt tt Public

    tiny todo.

    TypeScript

  5. firewall firewall Public

    C

  6. advent-of-code-bot advent-of-code-bot Public

    Forked from CSSUoB/advent-of-code-bot

    A simple Discord bot for Advent Of Code

    Python