- Float64TwoInt64
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"net/url"
|
"net/url"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -276,6 +277,10 @@ func Int2Str(value int) string {
|
|||||||
return strconv.Itoa(value)
|
return strconv.Itoa(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Float64TwoInt64(data float64) int64 {
|
||||||
|
return int64(math.Round(data))
|
||||||
|
}
|
||||||
|
|
||||||
// timestamp is in second
|
// timestamp is in second
|
||||||
func Timestamp2Str(timestamp int64) string {
|
func Timestamp2Str(timestamp int64) string {
|
||||||
return Time2Str(Timestamp2Time(timestamp))
|
return Time2Str(Timestamp2Time(timestamp))
|
||||||
|
|||||||
Reference in New Issue
Block a user