gobenrn

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-be-nrn

🇧🇪 Belgian National Registry Number Go Parser.

Installation

go get -u github.com/amrfaissal/go-be-nrn@latest

Usage

Documentation can be found here.

License

This Go module is available as open source under the terms of the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidNrnLength  = errors.New("invalid_nrn_length")
	ErrInvalidBirthYear  = errors.New("invalid_birth_year")
	ErrInvalidBirthMonth = errors.New("invalid_birth_month")
	ErrInvalidBirthDay   = errors.New("invalid_birth_day")
	ErrUnknownBirthDate  = errors.New("unknown_birth_date")
)

Functions

func Equal added in v1.2.0

func Equal(nrn1, nrn2 string) (bool, error)

Equal checks if two differently formatted NRNs are the same.

func GetAge

func GetAge(nrn string) (int, error)

GetAge returns person's age from the NRN (National Registry Number).

func GetBirthDate

func GetBirthDate(nrn, format string) (string, error)

GetBirthDate returns the date of birth from the NRN (National Registry Number) in the specified time format.

func IsBirthDateKnown added in v1.2.0

func IsBirthDateKnown(nrn string) (bool, error)

IsBirthDateKnown checks if the NRN holder's birth date is known.

func IsFemale

func IsFemale(nrn string) (bool, error)

IsFemale checks if the NRN holder is a Female.

func IsMale

func IsMale(nrn string) (bool, error)

IsMale checks if the NRN holder is a Male.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址