Discover Packages
github.com/amrfaissal/go-be-nrn
package
module
Version:
v1.2.0
Opens a new window with list of versions in this module.
Published: Jul 23, 2023
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
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.
Opens a new window with list of known importers.
README
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 .
Expand ▾
Collapse ▴
Documentation
¶
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")
)
Equal checks if two differently formatted NRNs are the same.
GetAge returns person's age from the NRN (National Registry Number).
GetBirthDate returns the date of birth from the NRN (National Registry Number) in the specified time format.
IsBirthDateKnown checks if the NRN holder's birth date is known.
IsFemale checks if the NRN holder is a Female.
IsMale checks if the NRN holder is a Male.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.