use chrono::TimeZone;
use chrono_tz::Europe::Stockholm;
fn main() {
let feb30 = Stockholm.ymd(1712,2,30);
println!("Date: {:?}", feb30);
}
target/debug/feb30
thread 'main' panicked at /home/snaggen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-0.4.34/src/offset/mod.rs:252:40:
No such local time
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
And then you get a call from a Swedish Wikipedia editor and they say:
February 30 was a day that happened in Sweden, 1712.[4] This occurred because, instead of changing from the Julian calendar to the Gregorian calendar by omitting a block of consecutive days, as had been done in other countries, the Swedish Empire planned to change gradually by omitting all leap days from 1700 to 1740, inclusive. Although the leap day was omitted in February 1700, the Great Northern War began later that year, diverting the attention of the Swedes from their calendar so that they did not omit leap days on the next two occasions; 1704 and 1708 remained leap years.[5]
To avoid confusion and further mistakes, the Julian calendar was restored in 1712 by adding an extra leap day, thus giving that year the only known actual use of February 30 in a calendar. That day corresponded to February 29 in the Julian calendar and to March 11 in the Gregorian calendar.[5][6] The Swedish conversion to the Gregorian calendar was finally accomplished in 1753, when February 17 was followed by March 1.[5]
Yes, that was the first that came to my mind when I saw the TIL post.... which also was why I felt the need to see if that rant is still valid, or if modern libraries could handle that.
I think it blows up because you need the Swedish calendar for the date to be valid, our calendar doesn't have this day. The date occurred when Sweden used a different calendar
That is wezterm which have builtin Nerd Font fallback, and I actually think WezTerm renders it to wide to fit it better with other fonts. But the rest of the font is JetBrains Mono