Created
July 17, 2024 19:04
-
-
Save nicolandu/904a4ea6ed7fd6086fe78f6be7080cf3 to your computer and use it in GitHub Desktop.
A special, minified Rust clock that prominently displays a particular day of the week.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use {chrono::{prelude::{*,Weekday::Wed as W},offset as o},std::thread::sleep,std::time::Duration as d};fn main(){loop{let u=o::Utc::now();let l=o::Local::now();let t=match(u.weekday(),l.weekday()){(W,W)=>("",""),(W,_)=>("",", BUT NOT FOR YOU"),(_,W)=>("NOT",", BUT IT IS FOR YOU"),(_,_)=>("NOT","")};println!("{} ({}) -- IT IS {}WEDNESDAY, MY DUDES{}",u.format("%Y-%m-%d %H:%M:%SZ"),l.format("%H:%M:%SL"),t.0,t.1);sleep(d::from_secs(1));}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment