Documentation ¶
Index ¶
- Constants
- func DateFmt(dateStr string) time.Time
- func DatetimeFmt(dateStr string) time.Time
- func DatetimeFmt1(dateStr string) time.Time
- func Day0Clock(t time.Time) time.Time
- func HourBase(t time.Time) time.Time
- func HourBaseUnix(ts int64) time.Time
- func Monday0Clock(t time.Time) time.Time
- func Month1st0Clock(t time.Time) time.Time
- func NowMonday0Clock() time.Time
- func NowMonth1st0Clock() time.Time
- func NowUponMonth1st0Clock() time.Time
- func Today0Clock() time.Time
- func TodayHourBase(h int) time.Time
- func TsCycle0Clock(cycle int32, ts int64) uint64
- func TsDay0Clock(ts int64) time.Time
- func TsMonday0Clock(ts int64) time.Time
- func TsMonth1st0Clock(ts int64) time.Time
- func TsUponCycle0Clock(cycle int32, ts int64) uint64
- func TsUponMonth1st0Clock(ts int64) time.Time
- func UponMonth1st0Clock(t time.Time) time.Time
Constants ¶
const ( GoTimeFmtBaseSimple = "20060102" GoTimeFmtBase = "2006-01-02 15:04:05" GoTimeFmtBase1 = "2006/01/02 15:04:05" )
const ( Second = 1 Minute = 60 * Second // 一分钟的秒数 Hour = 60 * Minute // 一小时的秒数 Day = 24 * Hour // 一天的秒数 Week = 7 * Day // 一周的秒数 )
Variables ¶
This section is empty.
Functions ¶
func HourBaseUnix ¶
HourBaseUnix The current hour starting from the specified timestamp. 指定时间戳的当前小时开始
func Monday0Clock ¶
Monday0Clock Monday at 0:00 specified by the timestamp. 指定时间戳所在的周一0点
func Month1st0Clock ¶
Month1st0Clock 1st day of the corresponding month at 0:00 specified time. 指定日期时间对应月份的1号0点
func NowMonday0Clock ¶
NowMonday0Clock Get the timestamp of 0:00 on Monday of the current week. 当前时间的周一0点
func NowMonth1st0Clock ¶
NowMonth1st0Clock The 1st day of the current month at 0:00. 当前时间的本月1号0点
func NowUponMonth1st0Clock ¶
NowUponMonth1st0Clock The 1st day of the current month at 0:00. 当前时间的本月1号0点
func TodayHourBase ¶
TodayHourBase Specified hour of the today 今日指定小时时间
func TsCycle0Clock ¶
0:day, 1:week, 2:month 默认返回今日0点
func TsDay0Clock ¶
TsDay0Clock 0 o'clock of the specified timestamp 指定时间戳的0点
func TsMonday0Clock ¶
TsMonday0Clock Monday at 0:00 of the specified date and time. 指定日期时间所在的周一0点
func TsMonth1st0Clock ¶
TsMonth1st0Clock 1st day of the corresponding month at 0:00 specified time. 指定时间戳对应月份的1号0点
func TsUponCycle0Clock ¶
0:day, 1:week, 2:month 默认返回今日0点
func TsUponMonth1st0Clock ¶
TsUponMonth1st0Clock 1st day of the corresponding month at 0:00 specified time. 指定时间戳对应月份的1号0点
Types ¶
This section is empty.