aboutsummaryrefslogtreecommitdiff
path: root/src/utils/time.rs
blob: 3149ce6e0db37d159865aec6e3c65465470e0df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::types::Config;
use chrono::prelude::*;

pub fn get_time(config: &Config) -> String {
    let now = Local::now();

    format!(
        "  {}  {}  {}",
        config.time.icon,
        now.format(&config.time.format),
        config.seperator
    )
}