duckling icon indicating copy to clipboard operation
duckling copied to clipboard

Not converting datetime into range

Open monika1800 opened this issue 8 years ago • 2 comments

Hi,

For the sentences involving terms such as "this week"/"this month", wit is not returning range in datetime entity. Rather it is giving the start date of the "week"/"month". Working fine in all other cases for "from" and "to" range in datetime.

monika1800 avatar Mar 06 '18 11:03 monika1800

Hi @monika1800,

Both are precise points in time, with a different granularity (as opposed to intervals). "this week" is a Time returning the beginning of the week as a value, with a grain of week. It is slightly different than from Monday to Sunday. Likewise, "this month" is a Time returning the beginning of the month as a value, with a grain of month (different than from the 1st to the 31st).

You can use the grain information to convert it to a range if that is easier to handle in your application.

Hope this helps.

patapizza avatar Mar 06 '18 19:03 patapizza

@patapizza Thanks a lot.

monika1800 avatar Mar 07 '18 06:03 monika1800