itimes

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StandardTime = "2006-01-02"

StandardTime 标准时间格式

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)

GetTimeZone 获取时区

func StrToTime

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

StrToTime 获取格式化后的时间

Types

This section is empty.

Jump to

Keyboard shortcuts

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