2017 © Pedro Peláez
 

library jmbg

Class used to extract data from ex Yugoslavian unique master citizen numbers.

image

avram/jmbg

Class used to extract data from ex Yugoslavian unique master citizen numbers.

  • Monday, January 29, 2018
  • by Avram
  • Repository
  • 1 Watchers
  • 1 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 31 % Grown

The README.md

JMBG

PHP class used to extract data from ex Yugoslavian unique master citizen numbers., (*1)

Introduction

JMBG (jedinstveni matični broj građana) or unique master citizen numbers is a 13 characters long number assigned to all newborns in ex Yugoslavian countries. It seems random but it isn't. It holds following data:, (*2)

  • date of birth
  • state of birth
  • place of birth (region/city)
  • gender
  • validation checksum

This PHP class can be used to extract this data from JMBG numbers. It uses PSR-4 autoloading standard., (*3)

Intallation

Install using composer with:, (*4)

composer require avram/jmbg, (*5)

Or manually by cloning this repository:, (*6)

git clone https://github.com/avramovic/JMBG.git, (*7)

Usage

<?php
require 'vendor/autoload.php'

use Avram\JMBG\JMBG;
$jmbg = new JMBG('1905983710332');
$data = $jmbg->getInfo();

var_dump($data);

You should get output like this:, (*8)

Array
(
    [jmbg] => 1905983710332
    [valid] => true
    [gender] => male
    [country] => Serbia
    [region] => Belgrade
    [birth_date] => 1983-05-19
    [birth_timestamp] => 422143200
    [age] => 32
)

Inspect the source code to see what methods are available in this class. Basically for every array element in the output above you have separate method., (*9)

Note

I've heard there are JMBGs issued with wrong checksum, so if that is true, it renders isValid() method useless. However, it is not a code issue, it's a bureaucracy issue. Most JMBGs are issued with a valid checksum., (*10)

The Versions

29/01 2018

dev-master

9999999-dev

Class used to extract data from ex Yugoslavian unique master citizen numbers.

  Sources   Download

MIT MIT License

The Requires

  • php >=5.3.0

 

by Nemanja Avramovic

03/11 2016

v0.1.3

0.1.3.0

Class used to extract data from ex Yugoslavian unique master citizen numbers.

  Sources   Download

MIT License

The Requires

  • php >=5.3.0

 

by Nemanja Avramovic

03/03 2016

v0.1.2

0.1.2.0

Class used to extract data from ex Yugoslavian unique master citizen numbers.

  Sources   Download

MIT License

The Requires

  • php >=5.3.0

 

by Nemanja Avramovic

03/03 2016

v0.1.1

0.1.1.0

Class used to extract data from ex Yugoslavian unique citizen identification numbers.

  Sources   Download

MIT License

The Requires

  • php >=5.3.0

 

by Nemanja Avramovic

28/02 2016

v0.1

0.1.0.0

Class to extract data from ex-Yugoslavian unique citizen identification numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Nemanja Avramovic