Chris Wilson
31e95e4fb3
Update Case for Sort, TitleCase, TwelveOclock, UltimateAnswer, Uppercase, ValarMorghulis, WeekdaysBetween, WhereAmI, WorkdaysBetween
2015-01-09 19:09:45 +11:00
jagtalon
981538c7c1
Attribution updates!
...
The string in index 1 should be the name of the developer. This allows us to group them together, i.e., we need a way to group the attribution by people.
2015-01-07 18:24:47 +00:00
Matt Miller
5457d4ec62
Goodies Templates: update some goodies for auto-template usage.
...
Testing these in duckpan will depend upon the changes in that repository
being integrated.
2014-11-15 21:32:59 +02:00
Matt Miller
da70710f7d
EOL: remove trailing whitespace.
2014-10-28 20:36:15 +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
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
Rob Emery
d7b2ab8df0
WorkdaysBetween: Switching to use new cleaner datestring_regex
2014-08-31 20:04:32 +01:00
Rob Emery
080df14e70
WorkdaysBetween: Using new DatesRole functionality to fix https://github.com/duckduckgo/zeroclickinfo-goodies/issues/346
2014-08-30 21:19:59 +01:00
Rob Emery
b6f2728e94
WorkdaysBetween: Fixing regex for date separator
2014-08-18 21:00:54 +01:00
Matt Miller
b4565b12b6
DatesRole: introduce date_output_string.
...
Takes a DateTime or a string we can turn into one and gives a
standardized output string for it. I'm not convinced this is entirely
the right way to do this.. or that it's named exactly correctly, but
it's probably better than specifying formats everywhere.
2014-08-11 22:05:56 -04:00
Rob Emery
4a25a8d697
WorkdaysBetween: Switching output format for consistency
2014-08-11 23:03:32 +01:00
Rob Emery
afed344b1a
DatesRole & WorkdaysBetween: Switching to use DatesRole
2014-08-11 22:29:43 +01:00
Pattarawat Chormai
5e096dda32
Refactor regular expession
2014-06-28 12:43:47 +07:00
Pattarawat Chormai
1b2a81963c
Rename submodule, making more sense
2014-06-28 12:40:16 +07:00
Pattarawat Chormai
5852576d88
Clean up waste space
2014-06-27 00:05:35 +07:00
Pattarawat Chormai
67f1b8b31c
Return nothing if we find invalid date like Feb 30th
2014-06-27 00:05:34 +07:00
Jag Talon
6e0d535776
WorkdaysBetween: Make it always inclusive.
2014-02-13 13:23:24 -05:00
Jag Talon
71960ef97b
Workdays: Add additional trigger word.
2014-02-11 13:57:31 -05:00
Jag Talon
813981a3e4
WorkdaysBetween: Use a module to compute the dates instead.
2014-02-04 13:01:03 -05:00
Jag Talon
b17f8a39eb
WorkdaysBetween: Revert to the old way of computing the dates.
2014-02-04 11:20:14 -05:00
Jag Talon
bf239264ee
WorkdaysBetween: Add support for MM.DD.YYYY.
2014-01-29 15:25:23 -05:00
Jag Talon
c757276fcf
WorkdaysBetween: Add support for full months such as "June 10, 2014".
2014-01-28 23:59:33 -05:00
Jag Talon
cb6aafb6af
WordaysBetween: Add "working days".
...
Thanks to @mintsoft for the suggestion.
2014-01-28 17:10:06 -05:00
Jag Talon
d1fbfcb00f
WorkdaysBetween: Add "work days between" as a trigger.
2014-01-28 09:36:06 -05:00
Jag Talon
11073bf32d
WorkdaysBetween: Add the %m-%d-%y format.
2014-01-28 09:14:32 -05:00
Jag Talon
054406b0d5
WorkdaysBetween: Support the shortened year format. Fixes #298 .
2014-01-27 18:01:39 -05:00
Jag Talon
a59abe766a
WorkdaysBetween: Updated the output to change depending on the number of weekdays.
...
It would say "There is one workday ..." instead of "There is one workdays ...".
2014-01-27 15:52:00 -05:00
Jag Talon
19756daa02
WorkdaysBetween: Clearer way of computing the business days.
...
I also added a bunch of comprehensive tests.
2014-01-25 12:42:03 -05:00
Jag Talon
2f2264b2ec
WorkdaysBetween: Fix issue when starting on a weekend.
...
The result was off by one when it started on either Saturday on Sunday. Another one that's worth noting is that $start->_wday actually has Sunday == 0.
2014-01-24 15:26:11 -05:00
Matt Garriott
edac815f85
WorkdaysBetween: Don't parse MM/DD and DD/MM in the same query
...
If either date requires the DD/MM/YYYY format, all XX/XX/XXXX dates in
the query will be formatted using the DD/MM/YYYY.
2014-01-16 21:26:52 -07:00
Matt Garriott
a49307abe3
WorkdaysBetween: Change output format to MMM DD, YYYY
2014-01-16 21:21:15 -07:00
Matt Garriott
a24f7f69e8
WorkdaysBetween: Use Time::Piece objects instead of Date::Calc
2014-01-16 19:14:43 -07:00
Matt Garriott
3e3a0049a6
WorkdaysBetween: Allow date format M/D/YYYY
2014-01-15 15:40:42 -07:00
Matt Garriott
34ab4ab57c
WorkdaysBetween: Allow comma in MMM DD, YYYY format
2014-01-15 15:38:36 -07:00
Matt Garriott
d59ff1ec61
WorkdaysBetween: Allow date format MMM DD YYYY
2014-01-15 15:36:01 -07:00
Matt Garriott
f4c5654097
WorkdaysBetween: Add comments to clarify remainder calculations
2014-01-15 15:30:59 -07:00
Matt Garriott
a69d24b336
WorkdaysBetween: Allow DD/MM/YYYY date format
2014-01-15 15:15:44 -07:00
Matt Garriott
8f483e6080
WorkdaysBetween: Parse dates in another subroutine
2014-01-15 14:59:49 -07:00
Matt Garriott
845b2822b2
WorkdaysBetween: Match on "business days between"
2014-01-15 13:58:05 -07:00
Matt Garriott
9fb1005e5d
WeekdaysBetween: Don't use integer pragma
...
Instead of using the integer pragma for the whole file, simply cast the
$num_weeks calculation to an integer before assignment.
2014-01-15 13:43:28 -07:00
Matt Garriott
b1c28a380f
WorkdaysBetween: Use default zci is_cached
...
zci is_cached => 1 is now the default, so there is no reason to specify
it explicitly.
2014-01-15 05:02:45 -07:00
Matt Garriott
3c21279db5
WorkdaysBetween: Add more detail to description
2014-01-14 17:54:14 -07:00
Matt Garriott
d416ede80b
WorkdaysBetween: Use Date::Calc::Objects for dates
2014-01-14 17:54:14 -07:00
Matt Garriott
4287a0b978
WorkdayBetween: Allow end date first
2014-01-14 17:54:14 -07:00
Matt Garriott
7c68752a05
WorkdaysBetween: Create first version
2014-01-14 17:54:14 -07:00