xtime

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FormatDate     = "ymd"
	FormatDateBar  = "y-m-d"
	FormatTime     = "y-m-d h:i:s"
	FormatTimeJoin = "ymdhis"
)

格式化占位符

Variables

This section is empty.

Functions

func Check added in v0.0.5

func Check(year, month, day int) bool

Check 校验日期有效性

func First

func First(t time.Time) int64

First ...

func Format

func Format(t time.Time, layouts ...string) string

Format ...

func FormatLayout added in v0.0.6

func FormatLayout(layout string) string

FormatLayout ...

func IsLeapYear added in v0.0.5

func IsLeapYear(year int) bool

IsLeapYear 是否是闰年

func Last

func Last(t time.Time) int64

Last ...

func Parse

func Parse(t string, layouts ...string) (time.Time, error)

Parse ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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