Commit Graph

57 Commits (master)

Author SHA1 Message Date
lernae cc1753acab Fixes #4102 Calendar: Shouldn't trigger on query for calendar.google.com (#4114) 2017-04-21 18:29:13 -04:00
Zach Thompson 73d8f72fc0 Remove id/name from Perl modules and tests 2016-03-18 11:49:33 -06:00
Mailkov 0dd5ccf808 fix merge conflict 2016-01-11 17:11:25 +00:00
Mailkov fc0ed491f0 delete html lines code 2015-12-26 15:08:43 +00:00
Mailkov 3c81a44e47 fix test CalendarToday.t 2015-12-26 14:18:10 +00:00
Mailkov 2e552b394b add circle today 2015-12-26 13:52:06 +00:00
Mailkov 3c32602a3a connect week_day position on content 2015-12-26 12:19:58 +00:00
Mailkov c6463eb22a connect month_year next_month previous_month to content.handlebars 2015-12-26 11:20:55 +00:00
Mailkov ce5c0678e6 change answer returned 2015-12-26 10:58:49 +00:00
Mailkov 9f7385570f change attribution 2015-12-26 10:53:16 +00:00
Zach Thompson 07b9def34a Goodbye metadata...mostly 2015-11-11 11:14:02 -07:00
Rob Emery 871bc8358f CalendarToday: Fixing indentation 2015-03-31 19:07:27 +01:00
Rob Emery 850c73d29a CalendarToday: Fixing indentation 2015-03-31 19:06:42 +01:00
Rob Emery f5de9046a9 Goodies: Harmonising trimming to use Text::Trim 2015-03-31 19:06:42 +01:00
Rob Emery 56c5ea4a5e Goodies: Enabling `use strict` on all goodies 2015-02-22 20:09:29 +00:00
Mitchell Perilstein 4d30565e11 revised: push logic into consumer of Dates.pm 2014-12-05 15:22:26 -05:00
jagtalon 773410e8e5 CalendarToday.pm: Made the links relative. 2014-11-20 18:21:49 +00:00
Usman Raza d77d00e82c updated arrow assets 2014-11-15 13:37:25 +05:00
Usman Raza d8c331ca9f account for year in next/pre links 2014-11-06 20:12:40 +05:00
Usman Raza 5837cac968 add next/pre month links for calendar 2014-11-06 17:02:25 +05:00
Rob Emery 4977f969c1 CalendarToday: Adding support for possesives 2014-11-02 22:53:05 +00:00
Matt Miller da70710f7d EOL: remove trailing whitespace. 2014-10-28 20:36:15 +02:00
mr.Shu e984da41fa update: Updated metadata missing in .pm files
* Updated a few metadata items that were missing in .pm files. These
  might be simply regarded as typos and thus, this commit is of very
  small importance.

Signed-off-by: mr.Shu <mr@shu.io>
2014-10-27 22:45:35 +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
Matt Miller 68fc7c8dec Set explicit caching everywhere.
This explicity sets the caching behavior for all goodies. Goodies which
did not have caching behavior set in their package have had it added.
Similarly for the tests.

This resulted in a number of changes for caching behavior, mostly
moving towards more frequent caching.

I identified three cases where goodies should not be cached. They are when
the result depends upon:

- some random element,
- the time of day or year (as with relative dates), or
- the location of the requesting user

In all other cases, I presumed that the goodies were sufficiently
deterministic in their output to warrant caching.
2014-09-27 10:35:17 -04:00
Matt Miller ebd15f598a Move goodies to new styling mechanism.
- Rename 'style.css' to appropriate ID-based name.
- Remove explicit inclusion of CSS, as it will now be auto-included.
- Update tests which explicitly checked for styling.
2014-09-10 17:28:30 -04:00
Matt Miller e4382bdd7b CalendarToday: simplify conditional a bit. 2014-09-01 14:58:29 -04:00
Matt Miller 73ccf7282e DatesRole: complete deprecation cycle.
- Deprecate 'parse_all_strings_to_date()' in favor of
  'parse_all_datestrings_to_date()' for consistency.
- Remove the deprecated functions.
- Update all calls.
2014-08-31 19:21:55 -04:00
Matt Miller 02c114607d CalendarToday: Simplify with dates role changes. 2014-08-31 16:36:40 -04:00
Rob Emery d064be2ed1 CalendarToday: more minor layout 2014-08-19 19:44:31 +01:00
Rob Emery 701c2d6c62 Merge branch 'mintsoft/date_role' of github.com:duckduckgo/zeroclickinfo-goodies into mintsoft/date_role
Conflicts:
	lib/DDG/Goodie/CalendarToday.pm
2014-08-19 19:42:54 +01:00
Rob Emery c1da3fc66e CalendarToday: Minor layout stuff 2014-08-19 19:41:17 +01:00
Matt Miller e7a2d170da CalendarToday: niggly formatting stuff.
None of this really matters, but when I looked at my previous diff some
of this stuff annoyed me, so tidying up a bit.
2014-08-19 14:39:28 -04:00
Matt Miller c9937790b3 CalendarToday: deeper refactoring of output.
- Clean up/remove some globals which confused things.
- Simplify logic-flow.
- Remove extraneous </div> from HTML output.
- Expand triggers to short months.

DatesRole:
- Create month_regex() to handle combo of short and full.
2014-08-19 14:27:31 -04:00
Rob Emery d00251c587 CalendarToday: Fixing tests and layout; reverted change for "calendar" working 2014-08-18 22:39:55 +01:00
Rob Emery 8fc0a8cefa CalendarToday: Spacing out try 2014-08-18 20:55:17 +01:00
Rob Emery 6784b151ba CalendarToday: Fixing highlighting for today 2014-08-18 20:37:45 +01:00
Rob Emery 3ef22a6016 CalendarToday: Tidying up 2014-08-18 20:28:05 +01:00
Matt Miller b7c5bbd8bd CalendarToday: protect on missing timezone.
DateTime doesn't like to have timezones passed in which it can't parse.
So, just continue on with whatever we have by default if the call
doesn't work.

Remove parsePsuedoDate which is now basically just an alias for
parse_vague_string_todate.

Also, reuse the timezoned DateTime for our default, rather than create
a new object.
2014-08-15 19:42:59 -04:00
Rob Emery f547249020 CalendarToday: minor cleanup 2014-08-15 20:31:28 +01:00
Rob Emery d39944cec6 CalendarToday: Switching to DatesRole 2014-08-15 20:26:55 +01:00
Rob Emery eb3523b848 CalendarToday: Deleting and tidying up ( not working yet ! ) 2014-08-15 19:57:48 +01:00
Jason Dorweiler a0bb132bd6 calendar: circle on today 2014-05-19 14:06:43 -04:00
Jason Dorweiler 4a12d1af69 calendar: highlight current day 2014-05-19 11:44:44 -04:00
Doug Brown ee875fbfc9 styling fixes for calendar goodie 2014-05-06 11:03:08 -04:00
brian e856091130 fix class collision with calendar header and new bttf header 2014-04-11 12:01:27 -04:00
Harald Ulver 8a31475cb6 use correct timezone 2014-03-15 18:27:15 +01:00
Harald Ulver 4902b3b8c2 read in css-file only once 2014-03-07 16:03:20 +01:00
Harald Ulver 314e6ecd48 fix code comments 2014-03-07 09:50:14 +01:00
Harald Ulver 0eec0cfc6b day as 3rd parameter, more comments, new testcases, fix layout-error 2014-02-27 20:50:40 +01:00