mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-08 22:52:29 +08:00
feat:add betweenSeconds func (#102)
Co-authored-by: leitao <leitao@kezaihui.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package datetime
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -20,6 +21,12 @@ func TestAddYear(t *testing.T) {
|
||||
assert.Equal(float64(-8760), diff2.Hours())
|
||||
}
|
||||
|
||||
func TestBetweenSeconds(t *testing.T) {
|
||||
now := time.Now()
|
||||
target := AddDay(now, 1)
|
||||
fmt.Println(BetweenSeconds(now, target))
|
||||
}
|
||||
|
||||
func TestAddDay(t *testing.T) {
|
||||
assert := internal.NewAssert(t, "TestAddDay")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user