PHP » GoLang |
login |
register |
about
|
strptimestrptime[code lang=golang] package main import ( "log" "fmt" "time" "github.com/araddon/dateparse" ) func main() { stringDate := "Mon, 10 Aug, 2020 08:35:35 AM" var parsedDate time.Time var err error if parsedDate, err = dateparse.ParseAny(stringDate); err != nil { log.Fatal(err) } fmt.Println(parsedDate) } [/code] |