// 日期工具
package utils
import (
"strings"
"time"
)
// 格式化为字符串
func ConvertDateToString(date time.Time, format string) string {
if format == "" || format == "date" {
return date.Format("2006-01-02")
} else {
return date.Format("2006-01-02 15:04:05")
}
}