Skip to content

Tools and helpers for PESEL (Polish identification number). Simple and fast valid and parse (sex, birthday) from string values.

Notifications You must be signed in to change notification settings

GetoXs/PeselTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

PeselTools

NuGet NuGet

Tools and helpers for PESEL (Polish identification number). Simple and fast valid and parse (sex, birthday) from string values.

Fully cooperate with checksum checking and 2000+ birthdays

Install

with nuget

Install-Package PeselTools

with .NET CLI

dotnet add package PeselTools

How to use

Parse

  //Parse
  string value = "70092746571";
  var pesel = Pesel.Parse(value);
  
  //or TryParse
  var isValid = Pesel.TryParse(value, out var result);

  //birthday
  var bd = pesel.BirthDate;

  //sex
  var sex = pesel.Sex;

  Console.WriteLine($"Pesel {pesel}. Birthday: {bd}, sex: {sex}.");

Validation only

  string value = "70092746571";
  var isValid = Pesel.IsValid(value);

About

Tools and helpers for PESEL (Polish identification number). Simple and fast valid and parse (sex, birthday) from string values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages