timex

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeRFC3339

func TimeRFC3339(o ...Option) time.Time

func TimeRFC3339String

func TimeRFC3339String(o ...Option) string

随便生成一个时间字符串,符合rfc3339格式 默认min是当前时间,max是当前时间+100年以内

func YYYYMMDD added in v0.0.2

func YYYYMMDD(o ...Option) string

随机生成一个时间字符串,格式是yyyy-MM-dd

func Year

func Year(o ...Option) string

随机生成一个时间字符串,格式是yyyy

Types

type Option

type Option func(*options)

func WithMax

func WithMax(max int64) Option

func WithMin

func WithMin(min int64) Option

Jump to

Keyboard shortcuts

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