mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
添加存储
This commit is contained in:
@ -2,9 +2,23 @@ package dateconv
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestParseDuration(t *testing.T) {
|
||||
t.Log(ParseDuration(""))
|
||||
t.Log(ParseDuration("abc"))
|
||||
}
|
||||
|
||||
func TestMonth(t *testing.T) {
|
||||
month := time.Now()
|
||||
|
||||
offset := (int(month.Month()) - 3)
|
||||
t.Log(offset)
|
||||
|
||||
month = month.AddDate(0, -3, 1)
|
||||
t.Log(month)
|
||||
|
||||
tt := time.Date(month.Year(), month.Month(), 1, 0, 0, 0, 0, month.Location())
|
||||
t.Log(tt)
|
||||
}
|
||||
|
Reference in New Issue
Block a user