datetime

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Layout = "2006-01-02 15:04:05"

模板时间:golang里面只能是 "2006-01-02 15:04:05" (go的诞生时间)

Variables

This section is empty.

Functions

func String2SysTime

func String2SysTime(dt string) (time.Time, error)

func SysTime2String

func SysTime2String(t time.Time) string

Types

type Date

type Date uint32 //20060102

func MakeDate

func MakeDate(y, m, d uint) Date

func NowDate

func NowDate() Date

func StringToDate

func StringToDate(d string) (Date, error)

func SysTime2Date

func SysTime2Date(t time.Time) Date

func (Date) AddDays

func (dt Date) AddDays(n int) Date

func (Date) ToSysTime

func (dt Date) ToSysTime() time.Time

type Datetime

type Datetime uint64 //20060102150405

func MakeDatetime

func MakeDatetime(y, m, d, H, M, S uint) Datetime

func NowDatetime

func NowDatetime() Datetime

func StringToDatetime

func StringToDatetime(dt string) (Datetime, error)

func SysTime2Datetime

func SysTime2Datetime(t time.Time) Datetime

func (Datetime) AddDays

func (dt Datetime) AddDays(n int) Datetime

func (Datetime) AddHours

func (dt Datetime) AddHours(n int) Datetime

func (Datetime) AddMinutes

func (dt Datetime) AddMinutes(n int) Datetime

func (Datetime) AddSeconds

func (dt Datetime) AddSeconds(n int) Datetime

func (Datetime) ToSysTime

func (dt Datetime) ToSysTime() time.Time

type Time

type Time uint32 //15*3600+4*60+5

func MakeTime

func MakeTime(h, m, s uint) Time

func NowTime

func NowTime() Time

Jump to

Keyboard shortcuts

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