Validate Swedish personal identity numbers with Rust.
use personnummer::Personnummer;
fn main() {
match Personnummer::new("199001011-0017") {
Ok(pnr) => println!("{}: {}", pnr.format().long(), pnr.valid()),
Err(e) => panic!("Error: {}", e),
}
}Fore more details, see examples and/or run
cargo run --example personnummer <personnummer>Fredrik "Frozzare" Forsmo (1991-2026) was the initiator, co-founder and a core contributor of the personnummer project. This library carries his work. He is missed.