idcode_helper

package
v0.0.0-...-bd18503 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IdCardAlpha = []int{7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 0}
View Source
var IdCardCheckSum = []byte{'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'}

Functions

func CheckIdCode

func CheckIdCode(idcode string) bool

CheckIdCode 判断身份证号是否合法,返回true合法,返回false不合法

Types

type IdCard

type IdCard struct {
	CardNum string
	// contains filtered or unexported fields
}

func ConvertOldIdCard

func ConvertOldIdCard(idcard string) *IdCard

func ParseIdCard

func ParseIdCard(idcard string) *IdCard

func (*IdCard) GetAge

func (i *IdCard) GetAge() int

func (*IdCard) GetAgeLevel

func (i *IdCard) GetAgeLevel(mode int) int

Jump to

Keyboard shortcuts

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