-
Notifications
You must be signed in to change notification settings - Fork 725
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
Parse a relative time from a specific referenceTime #37
Comments
Hi @amenella, This is possible using Example running a REPL session: > :l Duckling.Core
> import qualified Data.Time as Time
> d = Time.fromGregorian 2017 6 8
> tod = Time.TimeOfDay 0 0 0
> lt = Time.LocalTime d tod
> tz = Time.TimeZone 120 False "hmm"
> zt = Time.ZonedTime lt tz
> duckt = fromZonedTime zt
> parse "next monday at 8am" Context {referenceTime = duckt, lang = EN} [This Time]
[Entity {dim = "time", body = "next monday at 8am", value = "{\"values\":[{\"value\":\"2017-06-12T08:00:00.000+02:00\",\"grain\":\"hour\",\"type\":\"value\"}],\"value\":\"2017-06-12T08:00:00.000+02:00\",\"grain\":\"hour\",\"type\":\"value\"}", start = 0, end = 18}] Let me expose |
Thanks for the reply @patapizza if i'm not missing anything here, after having exposed Am I right ? Please forgive me if my question are meaningless, I'm just a beginner in haskell... |
Summary: See #37 Reviewed By: JonCoens Differential Revision: D5172801 fbshipit-source-id: bf63303
Yes that's right. :) Curious about why do timezones not work for you? |
Timezones are good but in a discussion, context always differs, especially when you're talking about time.
You can note that in Hope it's fullfilling your curiosity ! :) Thanks again ! |
Hi, at the current version, can we directly specify referencetime as augument in the request url? For example, curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_GB&referencetime=XXX&text=tomorrow at eight' |
Hi everyone,
Would it be possible to parse a time from a specific referenceTime ?
As i understood (let me know if i'm wrong) for now referenceTime is only based on the given timezone.
What I would like to do is to give as input a specific datetime, and get a result from that specific datetime.
For example if my inputs are
I would like to get next monday at 8am from the 8th of june 2017, that means
2017-06-12T08:00:00+02:00
Would it be possible ?
Thanks !
The text was updated successfully, but these errors were encountered: