19 lines
301 B
Go
19 lines
301 B
Go
package timehelper
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func Test_GetWeeHours(t *testing.T) {
|
|
fmt.Println(time.Unix(1672129500, 0))
|
|
|
|
fmt.Println(GetWeeHours(-1))
|
|
}
|
|
func TestGetTimeFromStrDate(t *testing.T) {
|
|
year, _, _ := GetTimeFromStrDate("2022-06-12")
|
|
age := GetAge(year)
|
|
fmt.Println(age)
|
|
}
|