hutime

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ymdhms   string = "2006-01-02 15:04:05"
	Ymd      string = "2006-01-02"
	YmdClean string = "20060102"
)

Variables

This section is empty.

Functions

func AddDay

func AddDay(number int, t ...time.Time) time.Time

func Date

func Date(t time.Time) string

func Monday

func Monday() time.Time

func MonthFirstDay

func MonthFirstDay(args ...string) string

MonthFirstDay 2021年9月23日 huhutime.MonthFirstDay() ==> 2021-09-01 huhutime.MonthFirstDay("02") ==> 2021-02-01 huhutime.MonthFirstDay("1999", "02") ==> 1999-02-01

func Now added in v1.0.3

func Now() *time.Time

func Parse

func Parse(layout string, timeStr string) (time.Time, error)

Parse layout

Ymdhms = "2006-01-02 15:04:05"
Ymd    = "2006-01-02"

func QianTian

func QianTian(args ...string) string

func Sunday

func Sunday() time.Time

func YearFirtsDay

func YearFirtsDay(yearstr ...string) string

YearFirtsDay 2021年9月23日 huhutime.MonthFirstDay() ==> 2021-01-01 huhutime.MonthFirstDay("1999") ==> 1999-01-01

func Yestoday

func Yestoday(t ...time.Time) time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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