14 lines
262 B
Rust
14 lines
262 B
Rust
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
|
|
)
|
|
}
|