timex

package
v0.0.0-...-02246d9 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Between

func Between(t, begin, end time.Time) bool

func ChineseTimeLocation

func ChineseTimeLocation() *time.Location

ChineseTimeLocation Return chinese time location

func DayEnd

func DayEnd(t time.Time) time.Time

func DayStart

func DayStart(t time.Time) time.Time

func IsAM

func IsAM(t time.Time) bool

IsAM Check is AM

func IsAmericaSummerTime

func IsAmericaSummerTime(t time.Time) (yes bool)

IsAmericaSummerTime 是否为美国夏令时间 夏令时开始于每年3月的第二个周日凌晨,人们需要将时间调早 (顺时针) 1个小时; 夏令时结束于每年11月的第一个周日凌晨,人们需要将时间调晚 (逆时针) 1个小时。

func IsPM

func IsPM(t time.Time) bool

IsPM Check is PM

func MonthEnd

func MonthEnd(t time.Time) time.Time

func MonthStart

func MonthStart(t time.Time) time.Time

func WeekEnd

func WeekEnd(yearWeek int) time.Time

func WeekStart

func WeekStart(yearWeek int) time.Time

func XISOWeek

func XISOWeek(t time.Time) (year, week int)

XISOWeek 非 ISO 周,从周日开始算起作为一周的第一天

func YearWeeksByTime

func YearWeeksByTime(startDate, endDate time.Time) []int

func YearWeeksByWeek

func YearWeeksByWeek(startYearWeek, endYearWeek int) []int

Types

This section is empty.

Jump to

Keyboard shortcuts

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