Documentation
¶
Index ¶
- Variables
- type TimeStamp
- func (ts TimeStamp) Add(seconds int64) TimeStamp
- func (ts TimeStamp) AddDuration(interval time.Duration) TimeStamp
- func (ts TimeStamp) AsTime() (tm time.Time)
- func (ts TimeStamp) AsTimePtr() *time.Time
- func (ts TimeStamp) Format(f string) string
- func (ts TimeStamp) FormatLong() string
- func (ts TimeStamp) FormatShort() string
- func (ts TimeStamp) IsZero() bool
- func (ts TimeStamp) Year() int
- type TimeStampNano
- func (ts TimeStampNano) Add(seconds int64) TimeStampNano
- func (ts TimeStampNano) AddDuration(interval time.Duration) TimeStampNano
- func (ts TimeStampNano) AsTime() (tm time.Time)
- func (ts TimeStampNano) AsTimePtr() *time.Time
- func (ts TimeStampNano) Format(f string) string
- func (ts TimeStampNano) FormatLong() string
- func (ts TimeStampNano) FormatShort() string
- func (ts TimeStampNano) IsZero() bool
- func (ts TimeStampNano) Year() int
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultLocation = time.Local
)
Functions ¶
This section is empty.
Types ¶
type TimeStamp ¶
type TimeStamp int64
TimeStamp defines a timestamp
func (TimeStamp) AddDuration ¶
AddDuration adds time.Duration and return sum
func (TimeStamp) FormatLong ¶
FormatLong formats as RFC1123Z
func (TimeStamp) FormatShort ¶
FormatShort formats as short
type TimeStampNano ¶
type TimeStampNano int64
TimeStampNano defines a timestamp to nano
func (TimeStampNano) Add ¶
func (ts TimeStampNano) Add(seconds int64) TimeStampNano
Add adds seconds and return sum
func (TimeStampNano) AddDuration ¶
func (ts TimeStampNano) AddDuration(interval time.Duration) TimeStampNano
AddDuration adds time.Duration and return sum
func (TimeStampNano) AsTime ¶
func (ts TimeStampNano) AsTime() (tm time.Time)
AsTime convert timestamp as time.Time in Local locale
func (TimeStampNano) AsTimePtr ¶
func (ts TimeStampNano) AsTimePtr() *time.Time
AsTimePtr convert timestamp as *time.Time in Local locale
func (TimeStampNano) Format ¶
func (ts TimeStampNano) Format(f string) string
Format formats timestamp as
func (TimeStampNano) FormatLong ¶
func (ts TimeStampNano) FormatLong() string
FormatLong formats as RFC1123Z
func (TimeStampNano) FormatShort ¶
func (ts TimeStampNano) FormatShort() string
FormatShort formats as short
Click to show internal directories.
Click to hide internal directories.