Jiff: checking iso date
⚓ Rust 📅 2026-02-04 👤 surdeus 👁️ 9Let's say I like to parse an iso date in order to learn if the iso date specified is valid.
Example: 2025-02-12 is valid. Both 2025-02-29 (2025 no leap year) and 2025-05-32 are not valid.
I can use
jiff::fmt::strtime::parse("%Y-%m-%d", "2025-02-12")?;
It checks ok in most cases except it doesn't detect invalid February dates.
What it the best way to detect invalid February date here?
4 posts - 3 participants
🏷️ Rust_feed