Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when parsing Japanese Dates #40

Open
jinro79 opened this issue Feb 9, 2020 · 0 comments
Open

Errors when parsing Japanese Dates #40

jinro79 opened this issue Feb 9, 2020 · 0 comments

Comments

@jinro79
Copy link

jinro79 commented Feb 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant