timeutils

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Based on Carcon development 2006-01-02 15:04:05

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNowDateInt20060815

func GetNowDateInt20060815() int32

* 返回当前日期 格式 20060102

func GetNowTime

func GetNowTime() string

获取当前时间 返回的格式 2006-01-02 15:04:05

func GetNowTimeInt150405

func GetNowTimeInt150405() int32

* 返回当前时间 格式 150405 15点04分05秒

func GetNowTimeString

func GetNowTimeString() string

获取当前时间 15:04:05 小时:分:秒

func GetNowTimestampInt64

func GetNowTimestampInt64() int64

返回当前时间的时间戮 秒

func GetTimeSubDate added in v1.0.8

func GetTimeSubDate(value string, n int64) string

*获得多少天前、后日期 返回 20060102 n 为负数 多少天后 n 为整数 多少天前

func GetTimeSubDateTime added in v1.0.7

func GetTimeSubDateTime(value string, n int64) string

获得多少天后的时间 n 为负数 多少天后 n 为整数 多少天前 2006-01-02 15:04:05

func HourAndMinuteAndSecondLater

func HourAndMinuteAndSecondLater(beginTime string, hms string) int64

15小时45分钟32秒 后的时间 参数 beginTime 2020-08-04 14:14:15 返回格式 时间戳 秒

func HourAndMinuteAndSecondLaterString

func HourAndMinuteAndSecondLaterString(beginTime string, hms string) string

5小时45分钟32秒 后的时间 参数 beginTime 2006-01-02 15:04:05 返回格式 2006-01-02 20:49:37

func HourAndMinuteAndSecondToSecond

func HourAndMinuteAndSecondToSecond(t string) int64

参数15:04:05 HH:MM:SS 返回秒数

func HowLongFromNow

func HowLongFromNow(value string) int64

时间差 当前时间 - 参数时间 相差多少秒 参数的格式 2020-08-04 14:14:15

func IsYesterday

func IsYesterday(value string) bool

参数的格式 2006-01-02 15:04:05 返回 true or false

func SecondToHourAndMinuteAndSecond

func SecondToHourAndMinuteAndSecond(value int64) string

value second 秒数 return second changeto 15:45:32 15小时45分钟32秒

func TimeStampToStr

func TimeStampToStr(timestamp int64) string

时间戳专业字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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