Zeroclickinfo-goodies: DaysBetween: Add trigger

Created on 7 Apr 2016  路  5Comments  路  Source: duckduckgo/zeroclickinfo-goodies

Could add "days until April 9" as a trigger. Currently the closest thing is "days from today to april 9"


IA Page: http://duck.co/ia/view/days_between
Maintainer: @JetFault

Low-Hanging Fruit Maintainer Timeout Suggestion

Most helpful comment

Same with days since. e.g. days since march 28. right now its days between march 29 and today

All 5 comments

Same with days since. e.g. days since march 28. right now its days between march 29 and today

Sounds like some special cases we could just map to their 'normal form'!

I'll take this on. Looking into it initially it looks like the IA is setup to trigger with only one date parameter, and it will default the second to today, but the current triggers only include things like "days between" or "days" which does not read well with only one date ("days between apr 9 2017").

We could either add a few extra triggers or remove the need for the date to be at the beginning of the string (eg. "days until apr 9 2017" would work then because days is a trigger word and until would simply be ignored. We could also keep the beginning of the string requirement for multiple dates supplied and only remove it when there is a single date supplied. Thoughts?

@stevenmg If you have a play around with it and it works, add some test cases and do a PR - if it works then awesome!

Just so long as we don't cause it to overtrigger - there's quite a few Date Instant Answers out there.

Ok, so I removed the need for a date to be at the beginning of the remainder. I also modified the trigger list to remove some more general items (days) but also loosened some others. I think this will improve triggering overall, but if you find any over-triggering we may need to tighten in again.

Was this page helpful?
0 / 5 - 0 ratings