|
|
@ -3,6 +3,7 @@ package transfer |
|
|
|
import ( |
|
|
|
"math" |
|
|
|
"strconv" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
|
func StringToInt(source string) (data int, err error) { |
|
|
@ -27,4 +28,8 @@ func DecimalToIntCeil(source float64) (data int) { |
|
|
|
|
|
|
|
func DecimalToIntFloor(source float64) (data int) { |
|
|
|
return int(math.Floor(source)) |
|
|
|
} |
|
|
|
|
|
|
|
func TimeToString(source time.Time, format string) (data string) { |
|
|
|
return source.Format(format) |
|
|
|
} |