I have a code https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=cde949e0a59445ee9beb01964a3ab903
use chrono::Datelike;
use chrono::Duration;
use chrono::Local;
fn main() {
let now = Local::now();
println!("######################################");
for day in 0..31 {
println!(
"{}",
(now + Duration::days(7 - now.weekday().num_days_from_monday() as i64 + day))
.format("%Y-%m-%d %A")
);
println!("\ntest\n\n########################");
}
}
Q: Where I need the weekdays to be in ex.: "HU" language and not in the English "Monday, Tuesday", etc.
I already tried based on https://docs.rs/chrono/0.4.19/chrono/ the ", Locale::hu_HU)" but always failed so far, can you pls help on this?