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

Exact dates with human readable months rules #11

Open
fred01 opened this issue Apr 21, 2018 · 1 comment
Open

Exact dates with human readable months rules #11

fred01 opened this issue Apr 21, 2018 · 1 comment

Comments

@fred01
Copy link

fred01 commented Apr 21, 2018

Hi!
Can you, please, add exact date rules for both languages? i.e.
25 april at 2.25pm and
25 апреля в 2.30 вечера

@fred01 fred01 changed the title Exact dates rules Exact dates with human readable months rules Apr 21, 2018
@orsinium
Copy link

orsinium commented Feb 27, 2019

It works if you use : as a separator for time:

gore> r, err := w.Parse("25 april at 2:25pm", time.Now())
&when.Result{
  Index:  0,
  Text:   "25 april at 2:25pm",
  Source: "25 april at 2:25pm",
  Time:   2019-04-25 14:25:12 Local,
}
nil
gore> r, err := w.Parse("25 апреля в 2:30 вечера", time.Now())
&when.Result{
  Index:  19,
  Text:   "2:30 вечера",
  Source: "25 апреля в 2:30 вечера",
  Time:   2019-02-27 14:30:14 Local,
}
nil

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

2 participants