stdnum.cn.ric

RIC No. (Chinese Resident Identity Card Number).

The RIC No. is the unique identifier for issued to China (PRC) residents.

The number consist of 18 digits in four sections. The first 6 digits refers to the resident’s location, followed by 8 digits represeting the resident’s birth day in the form YYYY-MM-DD. The next 3 digits is the order code which is the code used to disambiguate people with the same date of birth and address code. Men are assigned to odd numbers, women assigned to even numbers. The final digit is the checksum.

>>> validate('360426199101010071')
'360426199101010071'
stdnum.cn.ric.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.cn.ric.format(number)

Reformat the passed number to the standard format.

stdnum.cn.ric.get_birth_date(number)

Split the date parts from the number and return the birth date. Note that in some cases it may return the registration date instead of the birth date and it may be a century off.

stdnum.cn.ric.get_birth_place(number)

Use the number to look up the place of birth of the person.

stdnum.cn.ric.is_valid(number)

Checks to see if the number provided is a valid RIC numbers. This checks the length, formatting and birth date and place.

stdnum.cn.ric.validate(number)

Checks to see if the number provided is a valid RIC numbers. This checks the length, formatting and birth date and place.

Previous topic

stdnum.cl.rut

Next topic

stdnum.co.nit