You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
476 B

package times
import "time"
const FORMAT string = "2006-01-02 15:04:05"
const FORMAT2 string = "2006/01/02 15:04:05"
const FORMAT_DATE string = "2006-01-02"
const FORMAT_DATE2 string = "2006/01/02"
const FORMAT_MONTH string = "2006-01"
const FORMAT_TIME string = "15:04:05"
const FORMAT_TIME_Minute string = "15:04"
// ParseFORMAT 按FORMAT格式解析时间
// todo in location
func ParseFORMAT(datetime string) (time.Time, error) {
return time.Parse(FORMAT, datetime)
}