Skip to content

About

Validate Swedish personal identity numbers

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

60 Commits

Folders and files

Repository files navigation

Personnummer

Crates.io Rust

Validate Swedish personal identity numbers with Rust.

Usage

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>

In memoriam

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.

About

Validate Swedish personal identity numbers

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages