【文件属性】:
文件名称:日期:Golang中的日期类型
文件大小:21KB
文件格式:ZIP
更新时间:2021-02-06 10:32:29
go golang json library sql
Golang中的日期类型支持
Golang中的日期类型
单元测试
NullDate支持
使用日期类型的一些方法
用法
const RFC3339Date = "2006-01-02"
RFC3339日期格式
func RemoveTime
func RemoveTime ( t time. Time ) time. Time
RemoveTime删除时间的时间值.UTC时间:2020-01-01T15:30:30Z07:00-> 2020-01-01T00:00:00Z
输入日期
type Date time. Time
Date是仅Date的不可为null的类型。 仅支持UT
【文件预览】:
date-main
----go.mod(122B)
----util_test.go(4KB)
----.github()
--------workflows()
----time.go(946B)
----go.sum(2KB)
----sql.go(626B)
----time_test.go(5KB)
----date_test.go(4KB)
----util.go(2KB)
----date.go(1KB)
----LICENSE(1KB)
----json.go(896B)
----README.md(4KB)
----const.go(69B)
----string_test.go(518B)
----sql_test.go(2KB)
----num()
--------int.go(558B)
--------int_test.go(2KB)
----string.go(143B)
----.gitignore(280B)
----nulldate()
--------sql.go(581B)
--------json.go(1KB)
--------README.md(2KB)
--------string_test.go(747B)
--------null_date_test.go(7KB)
--------sql_test.go(3KB)
--------string.go(266B)
--------json_test.go(3KB)
--------null_date.go(2KB)
----json_test.go(2KB)