botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Resolve date from day

Open hgjkant opened this issue 10 years ago • 2 comments

Hi,

I've created a bot with builder v1.0.1, and am trying to get a date from only a day. For example, for 'set deadline to monday' I expect a date object set to Monday (possibly at midnight), but I'm getting nothing. Same for abbreviated or capitalized, and the day is also ignored in 'set deadline for Monday 2pm' (but the time works fine).

The code to get the date object (as from docs): var time = builder.EntityRecognizer.resolveTime(args.entities);

with args.entities being

[ { entity: 'monday',
    type: 'builtin.datetime.date',
    startIndex: 17,
    endIndex: 22,
    resolution: { date: 'XXXX-WXX-1' } } ]

Should this be possible?

hgjkant avatar Jun 10 '16 10:06 hgjkant

I've found that Luis can be a bit vague when it comes to dates. In your example you haven't specified which Monday you want the deadline setting for. Hence it has returned a string that is representing the first day of the week. If you said 'set deadline to next Monday' then the resolution would give you the date of the next Monday. You get the same type of response if you say something like Christmas Day. You get 'XXXX-12-25'

IanBoggs avatar Jun 13 '16 07:06 IanBoggs

Closing this issue. Please open a new issue for further discussion if necessary. Thanks!

v-thgratMSGit avatar Jul 12 '16 22:07 v-thgratMSGit