Documentation ¶
Index ¶
- func Base64Decode(src []byte) ([]byte, error)
- func Base64Encode(src []byte) []byte
- func BytesToHexString(data []byte) []string
- func DeleteSlice(slice interface{}, index int) (interface{}, error)
- func Md5Encrypt(data string) string
- func RsaDecrypt(ciphertext []byte, privateKey string) ([]byte, error)
- func RsaEncrypt(origData []byte, publicKey string) ([]byte, error)
- func StringToHexString(str string) []string
- type DateTool
- func (this *DateTool) CurrentUnixTimestamp() int64
- func (this *DateTool) Format(timestamp int64, layoutString string) string
- func (this *DateTool) FormatUnixTimestamp(timestamp int64) time.Time
- func (this *DateTool) GetFutureWeekIntervalOffset(weekday int, offset int64) (int64, int64)
- func (this *DateTool) GetLastWeekInterval(weekday int) (int64, int64)
- func (this *DateTool) GetLastWeekIntervalOffset(weekday int, offset int64) (int64, int64)
- func (this *DateTool) GetMonthDays(month, year int) int
- func (this *DateTool) GetNowUnixTimestamp() int64
- func (this *DateTool) MonthStrToInt(month string) int
- func (this *DateTool) NowHMS() (int, int, int)
- func (this *DateTool) ParseDatetimeString(datetime string) (time.Time, error)
- func (this *DateTool) TodayWeekday() (string, int)
- func (this *DateTool) TodayYMD() (int, int, int)
- func (this *DateTool) UnixToYMD(unixTimestamp int64) (int, int, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func BytesToHexString ¶
Convert byte array to hex string .
func Md5Encrypt ¶
Types ¶
type DateTool ¶
type DateTool struct { }
时间工具
func (*DateTool) CurrentUnixTimestamp ¶
func (*DateTool) Format ¶
fmt.Println(tm.Format("2006-01-0203:04:05PM")) fmt.Println(tm.Format("02/01/200615:04:05PM"))
func (*DateTool) FormatUnixTimestamp ¶
func (*DateTool) GetFutureWeekIntervalOffset ¶
获取多个偏移 n个 23:59:59 - 00:00:00
func (*DateTool) GetLastWeekInterval ¶
获取某一天的凌晨开始 向前一个周的该天的凌晨 00:00:00 返回begin end timestamp
func (*DateTool) GetLastWeekIntervalOffset ¶
获取多个偏移 n个 23:59:59 - 00:00:00
func (*DateTool) MonthStrToInt ¶
convert month string to month
func (*DateTool) ParseDatetimeString ¶
Click to show internal directories.
Click to hide internal directories.