atime

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLayout = errors.New(`parse layout failed`)
)

Functions

func GetAfter

func GetAfter(addTimes string) time.Time

GetAfter 获取之后的时间

func GetBefore

func GetBefore(minusTimes string) time.Time

GetBefore 获取之前的时间

func Millisecond

func Millisecond(i time.Time) int64

Millisecond ...

func TimeString

func TimeString(i time.Time) string

TimeString Time conversion String. 时间转string

func Timestamp

func Timestamp(i time.Time) int64

Timestamp Get timestamp.时间转时间戳

Types

type Date

type Date struct {
	time.Time
}

func Now

func Now() Date

Now

func WithDate

func WithDate(year, month, date, hour, minute, second int) Date

WithDate ...

func WithMillisecond

func WithMillisecond(millisecond int64) Date

WithMillisecond ...

func WithTime

func WithTime(t time.Time) Date

WithTime

func WithTimestamp

func WithTimestamp(timestamp int64) Date

WithTimestamp

func (Date) Format

func (date Date) Format(layout string, chinese ...bool) (string, error)

Format ...

Jump to

Keyboard shortcuts

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