timeTool

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Day

func Day() string

func Hour

func Hour() string

func LastMonth

func LastMonth() string

LastMonth 返回上个月的年月格式(例如:202312)

func LastWeek

func LastWeek() string

func LocalNow added in v0.5.6

func LocalNow() time.Time

func Location added in v0.5.6

func Location() *time.Location

func MidnightToday added in v0.4.7

func MidnightToday() time.Time

func MidnightTody

func MidnightTody() time.Time

func Minute

func Minute() string

func Month

func Month() string

func ParseDay

func ParseDay(dayStr string) (time.Time, error)

ParseDay 解析日期格式 (例如: 20240101)

func ParseHour

func ParseHour(hourStr string) (time.Time, error)

ParseHour 解析小时格式 (例如: 2024010112)

func ParseMinute

func ParseMinute(minuteStr string) (time.Time, error)

ParseMinute 解析分钟格式 (例如: 202401011230)

func ParseMonth

func ParseMonth(monthStr string) (time.Time, error)

ParseMonth 解析月份格式 (例如: 202401)

func ParseSecond

func ParseSecond(secondStr string) (time.Time, error)

ParseSecond 解析秒格式 (例如: 20240101123045)

func ParseWeek

func ParseWeek(weekStr string) (time.Time, error)

ParseWeek 解析周格式 (例如: 202401)

func Second

func Second() string

func Week

func Week() string

func WeekDay

func WeekDay() time.Weekday

func Year

func Year() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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