I want to parse the following string to a date in go:
"This item will be released on March 9, 2014."
I followed this and came up whith:
func findReleaseDateString(raw string) time.Time {
test, err := time.Parse("This item will be released on January 2, 2006.", raw)
if err != nil {
panic(err)
}
return test
}
Which works like a charm for english strings.
My problem: I would like to parse german strings. Like:
"Dieser Artikel wird am 9. März 2014 erscheinen."
I am aware, that I could match day, month and year via a regex and then parse it. But is there any possibility to tell time.Parse to use a different set of constants for month?