ittaxid

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(lastname, name, sex, birthDate, taxId string) error

Verify verifies the correctness of a taxId lastname is the lastname of the person name is the name of the person sex is "M" or "F" birthDate is the birth date in the format "YYYY-MM-DD" taxId is the taxId to verify

Types

type Info

type Info struct {
	Sex        string
	BirthDate  []string
	BirthPlace string
}

Info contains info extracted from a taxId the field Sex is "M" for male or "F" for female the field BirthDate is a slice of strings with the possible birth dates the field BirthPlace is the birth place in italian "Codice Catastale" format

func ExtractInfo

func ExtractInfo(taxId string) (*Info, error)

ExtractInfo extracts info from a taxId taxId must be 16 characters long the first 6 characters must be letters the 7th and 8th characters must be numbers the 9th character must be a letter the 10th and 11th characters must be numbers the 12th be a letters the 13th, 14th and 15th characters must be numbers the 16th character must be a letter returns an Info struct with the extracted info or an error

func (*Info) Equals

func (i *Info) Equals(other *Info) bool

Jump to

Keyboard shortcuts

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