import "time"
code
返回值int类型
返回值int类型
返回值Month类型
返回值int类型
返回值int类型
int类型
Clock () : 返回 时分秒 返回值int类型
对象
Hour () : 返回时返回值int类型
string
Minute () : 返回分 返回值int类型
io
Second () : 返回秒 返回值int类型
import
Nanosecond () : 返回纳秒 返回值int类型
序列化
返回值 int64
返回值 int64
返回值 *Location
返回值string+int
参考https://www.jianshu.com/p/9d5636d34f17
方法
func (t Time) MarshalBinary() ([]byte, error) {}
// 时间序列化im
func (t Time) UnmarshalBinary(data []byte) error {}
// 反序列化时间戳
func (t Time) MarshalJSON() ([]byte, error) {}
// 时间序列化d3
func (t Time) MarshalText() ([]byte, error) {}
// 时间序列化
func (t Time) GobEncode() ([]byte, error) {}
// 时间序列化
func (t Time) GobDecode() ([]byte, error) {}
// 时间序列化
func (t Time) IsZero() bool {}
// 是不是零时时间
func (t Time) After(u Time) bool {}
// 时间在u 以前
func (t Time) Before(u Time) bool {}
// 时间在u 以后
func (t Time) Equal(u Time) bool {}
// 时间与u 相同
func (t Time) Add(d Duration) Time {}
// 返回t +d 的时间点
func (t Time) Sub(u Time) Duration {}
// 返回 t-u
func (t Time) AddDate(years int, months int, days int) Time {}
返回增长了给出的年份、月份和天