When a lot of panicking APIs, such as NaiveDate::from_ymd() were deprecated I thought it to be a momentary aberration and locked the version at 0.4.22. A year has passed and proven me wrong.
I replaced .pred().pred() with - Duration::days(2) and now that's deprecated too.
In all of my code from_ymd(), from_hms() etc were only used ever with literals. I don't think that's uncommon. One could try to enforce that with a macro (e. g. date!(2024, 3, 6) similarly to how print!("Hi") only accepts string literals).
Whatever a good replacement is, it should've been implemented before the old version was deprecated.
When a lot of panicking APIs, such as
NaiveDate::from_ymd()were deprecated I thought it to be a momentary aberration and locked the version at 0.4.22. A year has passed and proven me wrong.I replaced
.pred().pred()with- Duration::days(2)and now that's deprecated too.In all of my code
from_ymd(),from_hms()etc were only used ever with literals. I don't think that's uncommon. One could try to enforce that with a macro (e. g.date!(2024, 3, 6)similarly to howprint!("Hi")only accepts string literals).Whatever a good replacement is, it should've been implemented before the old version was deprecated.