Skip to content

bombsimon/rust-personnummer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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>

About

🔢 Validate Swedish personal identity numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages