monday
monday copied to clipboard
Errors when parsing Japanese Dates
I am getting a time.ParseError when I run ParseInLocation for dates in Japanese.
Variables:
- layout = 発売予定日は2006年1月2日です。
- s = 発売予定日は2020年3月25日です。
- loc = UTC
- l = ja_JP
I call the function t, err = monday.ParseInLocation(layout, s, loc, l)
Error msg:
parsing time "発売予定日は2020年March25日です。" as "発売予定日は2006年1月2日です。": cannot parse "March25日です。" as "1"
Work around:
I comment out line 76-79 in format_ja_jp.go
// for k, v := range knownMonthsLongReverse[locale] { // value = strings.Replace(value, k, v, -1) // }
Please let me know if you need any more information.
Thanks, Luke