[TimexExpression] TimexRangeResolver.Evalute misevaluates Sunday (XXXX-WXX-7)
See original GitHub issueThe 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:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@glennmusa Thanks for double-checking and the fix PR.
This still occurs in the .NET Resolver. Proposed a change here: https://github.com/Microsoft/Recognizers-Text/pull/1537