utilsHelper

package
v0.0.0-...-2ddc99a Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = "2006-01-02"
View Source
const Time_Format = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func CheckTelFormat

func CheckTelFormat(tel string) bool

验证手机号码格式

bool:符合为 true,否则为 false

func GenValidateCode

func GenValidateCode(width int) string

生成验证码

param width 验证码位数

func GetTimestamp

func GetTimestamp() int64

获取当前时间戳

func StringToDTime

func StringToDTime(strTime string) time.Time

时间yyyy-MM-dd转time

func StringToSTime

func StringToSTime(strTime string) time.Time

时间yyyy-MM-dd HH:mm:ss转time

func TimestampToSTime

func TimestampToSTime(timestamp int64) string

时间戳转时间yyyy-MM-dd HH:mm:ss

func TimestampToTime

func TimestampToTime(timestamp int64) time.Time

时间戳转time

Types

This section is empty.

Jump to

Keyboard shortcuts

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