times

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 5 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

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

func GetMondayOfWeek

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

GetMondayOfWeek 获取本周周一的日期

func GetNextWeekMonday

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

GetNextWeekMonday 获取上周周日日期

func GetTimeRemainSeconds

func GetTimeRemainSeconds(startTimeStr, endTimeStr string) int

GetTimeRemainSeconds 获取两个时间的秒数差

func GetWeekDay

func GetWeekDay(date string) string

GetWeekDay 日期转周几

func GetZeroTime

func GetZeroTime(t time.Time) time.Time

GetZeroTime 获取某一天的0点时间

func NowTime

func NowTime(format ...string) string

NowTime 指定format的当前时间字符串

func TodayRemainSecond

func TodayRemainSecond() time.Duration

TodayRemainSecond 获取当天剩余的秒数

Types

This section is empty.

Jump to

Keyboard shortcuts

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