question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TimexExpression] TimexRangeResolver.Evalute misevaluates Sunday (XXXX-WXX-7)

See original GitHub issue

The following code resolves Sunday to Monday, but resolves Saturday and Monday as expected:

var constraints = new[]
{
    TimexCreator.NextWeeksFromToday(2),
    TimexCreator.Evening
};
List<TimexProperty> resolutions = null;
try
{
    resolutions = TimexRangeResolver.Evaluate(candidates, constraints);
}
catch
{
    return null;
}

The constraint is being passed in as a LUIS entity, so it is coming in as “XXXX-WXX-7” for Sunday, and as “XXXX-WXX-1” or “XXXX-WXX-6” for Monday or Saturday, respectively.

So running this code today (Tu 7/3) with a candidate of “XXXX-WXX-7” results in { “2018-07-09T16” and “2018-07-16T16” }, both of which are Mondays.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tellarincommented, Apr 24, 2019

@glennmusa Thanks for double-checking and the fix PR.

0reactions
glennmusacommented, Apr 23, 2019

This still occurs in the .NET Resolver. Proposed a change here: https://github.com/Microsoft/Recognizers-Text/pull/1537

Read more comments on GitHub >

github_iconTop Results From Across the Web

[TimexExpression] TimexRangeResolver.Evalute issues
Using a Botbuilder-dotnet prompt within a dialog to collect and validate a date against constraints is exhibiting strange behavior.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found