Commit Graph

37 Commits (master)

Author SHA1 Message Date
Rob Emery 6e4f269dca Merge pull request #2805 from duckduckgo/gd/datemath-after-before
DateMath: Add before/after forms
2016-05-23 13:09:04 +01:00
Ben Moon 83b9bbd6b7 Fix newline at end of file 2016-05-16 14:19:39 +01:00
Ben Moon 5f85cf4121 Update Goodies to use Test::Deep
* Ensure Test::Deep is imported.

* Replace '-ANY-' with ignore()

* Replace regexes with re(...)
2016-05-16 14:07:57 +01:00
Ben Moon c50527c85c Allow after/before forms
So you can do things like '3 days before today'.
2016-03-27 10:31:15 +01:00
Zach Thompson 73d8f72fc0 Remove id/name from Perl modules and tests 2016-03-18 11:49:33 -06:00
Ben Moon 24bfc7acc9 Add support for 'add' and 'subtract' forms 2016-03-14 21:58:07 +00:00
Ben Moon 2c78f15d63 Add support for 'what will the date be' form 2016-03-10 20:01:42 +00:00
Ben Moon 1e2b4448db Set signal to high
Sometimes it wasn't displaying when it should (was overridden).
2016-03-07 19:16:39 +00:00
Ben Moon d17148be99 Add support for 'what was the...' forms 2016-03-07 18:46:42 +00:00
Ben Moon 19776b1c7c Improve triggering
Add a bunch more common forms that I've seen in the searches - also
supports a couple of forms that should've been supported before.
2016-03-07 18:42:40 +00:00
Ben Moon 81ef278d27 Fix casing support
- Improve support for mixed-case queries.

 - Improve case-formatting of results.
2016-02-03 19:31:34 +00:00
Ben Moon 124eaa8e5a Prevent triggering on non-informative queries
If query has no action and is not relative, do not trigger.
2016-02-03 19:31:34 +00:00
Ben Moon 8c92fe2092 Update tests to static time zone
Now there shouldn't be a risk of the time-zone changing half-way through
the year.
2016-02-03 19:31:34 +00:00
Ben Moon 60a371dea8 Correct caching 2016-02-03 19:30:22 +00:00
Ben Moon b42bc4c7dd Add support for specifying time
Allows direct specification of time for input date.
2016-02-03 19:30:22 +00:00
Ben Moon 2093f3e073 Allow use of `time` form
Such as: `time now`, `time in 3 days` etc...

Will display time as well as date.
2016-02-03 19:30:22 +00:00
Ben Moon 8f3140ba1d Add some additional misc tests 2016-02-03 19:30:22 +00:00
Ben Moon a24b0aaf42 Update to use NumberStyler 2016-02-03 19:30:22 +00:00
Ben Moon e5f157bc90 Add high-resolution tests
For hours, minutes, seconds.
2016-02-03 19:30:21 +00:00
Ben Moon efed9432e2 Update tests to use helpers 2016-02-03 19:30:21 +00:00
Ben Moon ae7ecf68cf Add test helpers 2016-02-03 19:30:21 +00:00
W25 504b7c3a94 Merged with master (uppercase operation) 2015-01-16 01:54:04 +00:00
Chris Wilson 2f11d6cc76 Update Binary IA to Uppercase. Fix All Test Cases for Uppercase Changes. 2015-01-09 19:46:54 +11:00
W25 267c68e689 Fixed year in tests 2014-12-27 09:47:30 +00:00
W25 9f4604eeb6 Reverted the unnecessary 'in X days' check 2014-12-27 08:59:29 +00:00
W25 c64793d0b0 Switched to MockTime 2014-12-27 08:42:14 +00:00
W25 dada468e2d Added more tests 2014-12-25 16:23:31 +00:00
W25 bc6a53ee6b Added ago/from triggers 2014-12-25 07:05:12 +00:00
Matt Miller 6e0e031ebc DateMath: add structured answer. 2014-11-15 21:32:59 +02:00
Matt Miller 5faf30c129 DateMath: properly recognize and handle weeks.
Fixes #628.
2014-09-10 08:27:54 -04:00
Matt Miller 3503faccca DateMath: expand query-space with datestring_regex(). 2014-08-31 16:36:40 -04:00
Rob Emery 6b4b09399b DatesRole & DateMath: switching to use DateRole 2014-08-11 22:58:28 +01:00
Eric Johnson 9c29b27338 Added tests for example queries which are not currently tested.
Conflicts:

	t/TimezoneConverter.t
2014-02-10 21:36:14 +00:00
Dylan Lloyd cf0b05aa95 fix year-specific DateMath tests 2013-01-03 08:24:20 -05:00
Michael Smith 1a75b5fb84 enhancements and bugfixes to DateMath 2012-05-20 10:15:56 -06:00
CJ 51c49f609e lean on Date::Calc to figure out text dates 2012-05-09 19:23:15 -07:00
CJ 3656531632 add/subtract days/weeks/months/years to/from a date 2012-05-08 19:01:16 -07:00