iowo/crates/app/src/welcome_msg.rs

17 lines
587 B
Rust
Raw Normal View History

2024-01-12 08:36:30 +00:00
use time::{Month, OffsetDateTime};
2024-01-19 08:51:48 +00:00
/// Print the startup message which changes depending on system time.
2024-01-12 08:36:30 +00:00
pub fn print_startup_msg() {
// now or fallback to utc
let now = OffsetDateTime::now_local().unwrap_or_else(|_| OffsetDateTime::now_utc());
if now.month() == Month::June {
2024-01-19 08:51:48 +00:00
// pride startup message
2024-01-12 08:36:30 +00:00
println!("Hello, thanks for using iOwO and happy pride month!");
2024-01-19 08:51:48 +00:00
// TODO: proper link with explaination
2024-01-12 08:36:30 +00:00
println!("Why pride month is important in {}", now.year());
} else {
println!("Hello, thanks for using iOwO! :3");
}
}