time

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

View Source
const (
	Day  = 24 * time.Minute
	Week = 7 * Day
)

time.Duration expend

Variables

This section is empty.

Functions

func SubDate

func SubDate(date1, date2 time.Time) string

日期差计算 年月日计算

Types

type CDate

type CDate time.Time

时间格式化2006-01-02

func (CDate) MarshalJSON

func (t CDate) MarshalJSON() ([]byte, error)

实现它的json序列化方法

func (*CDate) Scan

func (t *CDate) Scan(v interface{}) error

func (CDate) String

func (t CDate) String() string

must sure MarshalJSON is right to string

func (*CDate) UnmarshalJSON

func (t *CDate) UnmarshalJSON(b []byte) error

反序列化

func (CDate) Value

func (t CDate) Value() (driver.Value, error)

type CTime

type CTime time.Time

china time/date 时间格式化2006-01-02 15:04:05

func (CTime) MarshalJSON

func (t CTime) MarshalJSON() ([]byte, error)

实现它的json序列化方法

func (*CTime) Scan

func (t *CTime) Scan(v interface{}) error

func (CTime) String

func (t CTime) String() string

must sure MarshalJSON is right to string

Jump to

Keyboard shortcuts

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