diff options
Diffstat (limited to 'src/utils/time.rs')
-rw-r--r-- | src/utils/time.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/utils/time.rs b/src/utils/time.rs index fcfb691..191d91b 100644 --- a/src/utils/time.rs +++ b/src/utils/time.rs @@ -1,13 +1,16 @@ use crate::config::CONFIG; +use crate::types::ThreadsData; use chrono::prelude::*; -pub fn get_time() -> String { +pub fn get_time() -> ThreadsData { let now = Local::now(); - format!( + let data = format!( " {} {} {}", CONFIG.time.icon, now.format(&CONFIG.time.format), CONFIG.seperator - ) + ); + + ThreadsData::Time(data) } |