Documentation ¶
Index ¶
- Constants
- func FormUnixToString(t int64, layout string) string
- func GetAgeWithIDCard18(idCard string, refDate time.Time) int
- func GetSexWithIDCard18(idCard string) int
- func IsAdult(idCard string) bool
- func Json(data interface{}) string
- func Misty(raw string, b, e int, k string) string
- func MistyDefault(raw string) string
- func MistyMail(raw string) string
- func MistyMobile(raw string) string
- func RandomID() string
- func Sha1ID(data []byte) string
- func Sha1IDSimple(data []byte) string
- func TimeDate(t time.Time) int64
- func TimeFormat(t time.Time) string
- func TimeNumber(t time.Time) int64
- func ToCST(t time.Time) time.Time
Constants ¶
View Source
const ( DefaultTimeFormat = "2006-01-02 15:04:05" NumberTimeFormat = "20060102150405" DateTimeFormat = "20060102" )
Variables ¶
This section is empty.
Functions ¶
func FormUnixToString ¶
layout: 2006-01-02 15:04:05 、 20060102150405 、2006年01月02日 15:04:05
func GetAgeWithIDCard18 ¶
GetAgeWithIDCard18 判断身份证相对于参考时间多少年
func GetSexWithIDCard18 ¶
GetSexWithIDCard18 判断身份证获取性别;-1未知,1性别为男,0则为女
func MistyDefault ¶
MistyDefault将给定的字符串进行处理,并返回处理后的字符串。 参数raw为原始字符串。 返回值为处理后的字符串。
func MistyMobile ¶
func Sha1IDSimple ¶ added in v0.3.3
Sha1IDSimple 生成一个基于SHA1哈希值的UUID字符串
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.