GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - macuk/pesel: Pesel class to check PESEL number and get information about its owner

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
Gemfile
Gemfile
 
 
README
README
 
 
Rakefile
Rakefile
 
 
pesel.gemspec
pesel.gemspec
 
 

Repository files navigation

Pesel
=====

This gem provides the Pesel class to check the PESEL number
and get information about its owner.

PESEL (Polish Powszechny Elektroniczny System Ewidencji Ludności,
Universal Electronic System for Registration of the Population)
is the national identification number used in Poland since 1979.

The PESEL number is mandatory for all permanent residents of Poland
and for temporary residents living in Poland for over 2 months.
Applicants for Polish citizenship must request a PESEL number together
with their passport application.

[http://en.wikipedia.org/wiki/PESEL]

Interesting information about PESEL (in Polish language):
http://wipos.p.lodz.pl/zylla/ut/pesel.html

If you are looking for the Pesel as a plugin:
http://github.com/macuk/pesel-plugin

Installation
============

gem install pesel

Example
=======

Standalone class:

  require 'pesel'

  pesel = Pesel.new('75120804355')
  pesel.valid?      # true
  pesel.birth_date  # Date object with '1975-12-08' date
  pesel.female?     # false
  pesel.male?       # true
  pesel.gender      # :male
  pesel.number      # '75120804355'

  pesel = Pesel.new('00000000000')
  pesel.valid?      # false
  pesel.birth_date  # raises Pesel::NumberInvalid exception
  pesel.female?     # raises Pesel::NumberInvalid exception
  pesel.male?       # raises Pesel::NumberInvalid exception
  pesel.gender      # raises Pesel::NumberInvalid exception
  pesel.number      # raises Pesel::NumberInvalid exception

ActiveRecord:

  class Person < ActiveRecord::Base
    validate :check_pesel

    private
      def check_pesel
        p = Pesel.new(pesel)
        errors[:pesel] << 'Invalid PESEL number' unless p.valid?
      end
  end


Copyright (c) 2009-2010 Piotr Macuk, released under the MIT license

About

Pesel class to check PESEL number and get information about its owner

rubygems.org/gems/pesel

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.