times

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BirthdayToAge

func BirthdayToAge(birthday string) (age int)

BirthdayToAge 根据生日算年龄

func FirstDayOfISOWeek

func FirstDayOfISOWeek(year int, week int, timezone *time.Location) time.Time

通过ISOWeek翻转得到周的日期时间 @see https://blog.csdn.net/pingD/article/details/60964306

func GetMondayOfWeek

func GetMondayOfWeek(t time.Time, fmtStr string) (dayStr string)

获取本周周一的日期

func GetNextWeekMonday

func GetNextWeekMonday(t time.Time, fmtStr string) (day string, err error)

获取上周周日日期

func GetTimeRemainSeconds

func GetTimeRemainSeconds(startTimeStr, endTimeStr string) int

获取两个时间的秒数差

func GetWeekDay

func GetWeekDay(date string) string

输入日期转周几

func GetZeroTime

func GetZeroTime(t time.Time) time.Time

获取某一天的0点时间

func NowTime

func NowTime(format ...string) string

NowTime 当前时间 @author Cloud|2021-12-13 09:40:41 @param format ...string ... @return string ...

func TodayRemainSecond

func TodayRemainSecond() time.Duration

TodayRemainSecond 获取当天剩余的秒数 @author Cloud|2021-12-12 12:49:41 @return time.Duration ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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