Skip to content
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

"last weekend of october" #50

Closed
tarung-ml opened this issue Jun 20, 2017 · 3 comments
Closed

"last weekend of october" #50

tarung-ml opened this issue Jun 20, 2017 · 3 comments

Comments

@tarung-ml
Copy link

This returns: a weekend of october from last year (2016). May be more plausible to have it return: fourth weekend of october 2017 i.e. October 27- October 30.

@patapizza
Copy link
Contributor

Indeed, thanks for reporting @tarung-ml!

@pcgreat
Copy link
Contributor

pcgreat commented Jun 21, 2017

@patapizza say we are trying to create a rule like "last <weekend> of <named-month>", I know we can use "Predicate isAMonth" to capture the month, but not sure how to capture the "weekend". Shall we create a new predicate like "Predicate isWeekend" to do so, or is there a better way?

@patapizza
Copy link
Contributor

@pcgreat Ideally we would have a notion of weekend in the Time internals. This is not straightforward to do, so I would suggest to directly capture "weekend" at the character level (regex), and reuse ruleWeekend and predLastOf (as in ruleLastDOWOfTime).

pcgreat added a commit to pcgreat/duckling that referenced this issue Jun 21, 2017
facebook-github-bot pushed a commit that referenced this issue Jun 23, 2017
Summary: Closes #52

Reviewed By: blandinw

Differential Revision: D5296543

Pulled By: patapizza

fbshipit-source-id: 041844a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants