@ -4,3 +4,4 @@
.idea
.vscode
.log
gomod.sh
@ -5,6 +5,8 @@ import (
"time"
)
const Version = "1.0.1"
// 时间格式化常量
const (
RFC3339Format = time.RFC3339
@ -53,6 +53,8 @@ func TestTime(t *testing.T) {
t.Log("相差多少小时(绝对值):", SetCurrentParse("2022-03-01T10:03:39+08:00").Format())
t.Log("相差多少小时(绝对值):", SetCurrentParse("2022-03-04T11:12:47+08:00").Format())
t.Log("BSON:", Current().Bson())
}
func TestDayStartOfEnd(t *testing.T) {
@ -0,0 +1,6 @@
package gotime
// Bson mongoDB
func (p Pro) Bson() string {
return p.Now().String()