cwallen
8aa0d47817
Change our to accessor function
2015-07-19 18:02:35 +00:00
cwallen
a4ab113476
Fix MSK timezone and consolidate timezone lists.
2015-07-19 04:43:36 +00:00
Rob Emery
3db537d529
DatesRole: parse_all_datestrings_to_date will now use the first date as a base for ambiguous formats
2015-02-01 17:39:43 +00:00
W25
9f4604eeb6
Reverted the unnecessary 'in X days' check
2014-12-27 08:59:29 +00:00
W25
dada468e2d
Added more tests
2014-12-25 16:23:31 +00:00
W25
d561cec4ba
Removed today/yesterday trigger, added 'in 5 days'
2014-12-25 07:33:53 +00:00
Mitchell Perilstein
4d30565e11
revised: push logic into consumer of Dates.pm
2014-12-05 15:22:26 -05:00
Mitchell Perilstein
4a612c2f7c
One-liner fix for issue #773 and new unit tests to exercise that area.
2014-11-29 18:48:23 -05:00
Rob Emery
64bcbb87db
DatesRole: Fixing regression with "next <month>" introduced by dodgey merging
2014-11-02 22:37:47 +00:00
Rob Emery
4bad1f8e67
DatesRole: Fixing regression on singlename months
2014-11-02 22:27:58 +00:00
Rob Emery
56f0c7529a
Merge branch 'mintsoft/relative_dates' of github.com:duckduckgo/zeroclickinfo-goodies into mintsoft/relative_dates
...
Conflicts:
lib/DDG/GoodieRole/Dates.pm
t/00-roles.t
t/CalendarToday.t
2014-10-31 21:48:19 +00:00
Matt Miller
665dd0c3e5
DatesRole: grab $loc info off the calling package.
...
As one might suspect, the testing is the difficult part with per-instance
"package variables.
I welcome more comprehensive tests, but I don't know that I am up to
creating them.
2014-10-31 18:27:53 +02:00
Rob Emery
8170857b08
DatesRole: making util "nominally private"
2014-10-31 18:27:09 +02:00
Rob Emery
f192992a30
DatesRole: Ternaries ftw!
2014-10-31 18:27:09 +02:00
Rob Emery
bcb0404d0c
DatesRole: Fixing *stupid* mistake in regex
2014-10-31 18:27:09 +02:00
Rob Emery
eb745ab474
DatesRole: Removing prototype from util sub
2014-10-31 18:26:31 +02:00
Rob Emery
98d0adb403
DatesRole: refactoring into utility function
2014-10-31 18:26:31 +02:00
Rob Emery
3ca4f6ccf5
DatesRole: Expanding test coverage and first (probably broken) implementation
2014-10-31 18:26:31 +02:00
Rob Emery
cf246bb9d4
DatesRole: Adding regex and failing tests for new proseque formats
2014-10-31 18:26:31 +02:00
Rob Emery
a99f8a29e7
DatesRole: Tidying up
2014-10-31 18:26:31 +02:00
Rob Emery
6f79f3a123
DatesRole: Clarifying terrible comment
2014-10-31 18:26:31 +02:00
Rob Emery
7c6679b3fb
DatesRole: Renaming misleading regex
2014-10-31 18:26:31 +02:00
Matt Miller
ab20f6c8e0
DatesRole: add "this" week|month|year.
...
At this point,all of them are essentially aliases for "today", but the
logic is kept separate in case we want to move them to start of period
or similar.
Minor update on Chinese Zodiac to demonstrate it working through the
role instead of local triggering.
2014-10-31 18:26:31 +02:00
Matt Miller
592375e883
DatesRole: definededness not truthiness for parsing.
...
I don't know that we'd ever need to actually support year 0 or similar,
but there may come a day where we support epochs or something and it
might make sense.
2014-10-31 18:26:31 +02:00
Rob Emery
97a7541706
DatesRole: minor cleanup
2014-10-31 18:26:31 +02:00
Matt Miller
ffd257aa09
DatesRole: fix and expand relative dates.
...
- Add grouping to regex for proper |ing.
- Add 'year' to relative dates. (See Chinese zodiac)
- Add more tests.
2014-10-31 18:26:31 +02:00
Rob Emery
d12154fdc0
DatesRole: Minor tidyup
2014-10-31 18:25:59 +02:00
Rob Emery
76edd1de1d
DatesRole: Adding rough implementation for relative times
2014-10-31 18:25:59 +02:00
Rob Emery
98ef4b7899
DatesRole: Adding regex and failing tests for relative day parsig
2014-10-31 18:25:59 +02:00
Matt Miller
da70710f7d
EOL: remove trailing whitespace.
2014-10-28 20:36:15 +02:00
Rob Emery
d7f2d527f8
DatesRole: making util "nominally private"
2014-10-13 12:43:27 +01:00
Rob Emery
c34f5024f4
DatesRole: Ternaries ftw!
2014-10-13 12:42:49 +01:00
Rob Emery
901ad94cdd
DatesRole: Fixing *stupid* mistake in regex
2014-10-12 22:08:12 +01:00
Rob Emery
aa30b6e2b1
DatesRole: Removing prototype from util sub
2014-10-12 21:23:51 +01:00
Rob Emery
7bf83d0570
DatesRole: refactoring into utility function
2014-10-12 21:22:48 +01:00
Rob Emery
4dbb8b07e3
DatesRole: Expanding test coverage and first (probably broken) implementation
2014-10-12 21:09:33 +01:00
Rob Emery
b36a54ff56
DatesRole: Adding regex and failing tests for new proseque formats
2014-10-12 20:41:58 +01:00
Rob Emery
03f8cf0e0e
DatesRole: Tidying up
2014-10-12 20:34:06 +01:00
Rob Emery
194b21c89e
DatesRole: Clarifying terrible comment
2014-10-12 20:27:56 +01:00
Rob Emery
831055b726
DatesRole: Renaming misleading regex
2014-10-12 20:08:30 +01:00
Matt Miller
4e53d2aca2
DatesRole: add "this" week|month|year.
...
At this point,all of them are essentially aliases for "today", but the
logic is kept separate in case we want to move them to start of period
or similar.
Minor update on Chinese Zodiac to demonstrate it working through the
role instead of local triggering.
2014-10-10 16:12:05 +02:00
Matt Miller
166519a44d
DatesRole: definededness not truthiness for parsing.
...
I don't know that we'd ever need to actually support year 0 or similar,
but there may come a day where we support epochs or something and it
might make sense.
2014-10-10 04:15:48 +02:00
Rob Emery
166ae9449f
DatesRole: minor cleanup
2014-10-09 19:22:30 +01:00
Matt Miller
478256f524
Merge remote-tracking branch 'origin/master' into mintsoft/relative_dates
...
Conflicts:
lib/DDG/GoodieRole/Dates.pm
2014-10-09 14:11:41 +02:00
Matt Miller
7c58753db2
DatesRole: fix and expand relative dates.
...
- Add grouping to regex for proper |ing.
- Add 'year' to relative dates. (See Chinese zodiac)
- Add more tests.
2014-10-09 14:07:15 +02:00
Matt Miller
a26e6fc5c0
DatesRole: better protect against undef datestrings.
2014-10-09 13:03:57 +02:00
Rob Emery
57783d5cfb
DatesRole: Minor tidyup
2014-10-09 00:01:10 +01:00
Rob Emery
bbf6d2066f
DatesRole: Adding rough implementation for relative times
2014-10-08 23:56:58 +01:00
Rob Emery
aeb272ec55
DatesRole: Adding regex and failing tests for relative day parsig
2014-10-08 23:43:45 +01:00
Matt Miller
8f858b387e
CalendarToday: tighten up query triggers a bit.
...
- Add filler_words list which can be stripped from the query before
trying to parse date strings.
- Anchor datestring_regex so as to allow for only date left in query
after clean-up.
- Improve guard against empty strings and `undef` in Dates role parsers.
Fixes #661 .
2014-10-03 17:16:33 +02:00