times

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 4 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLayout

func AddLayout(udfLayouts []string)

AddLayout 可以增加用户自定义的时间类型

func Format

func Format(format string, ts ...time.Time) string

Format 跟 PHP 中 date 类似的使用方式,如果 ts 没传递,则使用当前时间

func GetTimeZone

func GetTimeZone() (zoneName, zoneValue string)

func StrToTime

func StrToTime(value string) (time.Time, error)

func StrToTimeLocation added in v1.5.2

func StrToTimeLocation(value string, loc *time.Location) (time.Time, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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