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.
- Convert to ISO-8601 for the parse.
- Support short month to number in service of above.
- Support TZ to UTC offset in service of above.
In cases where the TZ abbreviation was ambiguous I selected what I
deemed to be the most populous or most likely to be a DDG user's intent.
I may, of course, be wrong.
Fixes#621.
- Deprecate 'parse_all_strings_to_date()' in favor of
'parse_all_datestrings_to_date()' for consistency.
- Remove the deprecated functions.
- Update all calls.
Unlike previous iterations which used Time::Piece, we will only actually
return objects for valid dates.. even if the day/month combination was
valid for some other year.
In each case, we have a month match, so name them all the same.
Then, figure out how each different part of the specific match effects
the resultant date calculation.
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.
I think this is vaguely easier to read (and it may return a bit earlier,
if that's important which it is probably not). I may, of course, be
wrong.
Add named captures for the ambiguous formats to make it easier to know
what we "expect" the order to be unless it is flipped.
Also includes some minor formatting changes, due to my incessant use of
`perltidy`, and some test case arrangement changes to satisfy my desire
for order.
- Properly note the role is applied to a class not an object.
- Add a few more cases for invalid multi-format date parsing.
- Do more subtext separation as this suite is growing quite large.
Some added tests for places where the string passes the regex "maybe it
looks like a date" test, but is not, in fact able to be parsed by the
engine.
Plus, a bit more diagnostic info output for provers.
- Settle on `undef` as a signal for failure.
- Maintain regex in a `state` variable.
- Return undef if it doesn't match our regex.
- Don't die if its still unparseable.
Also, add Test::Most and Try::Tiny to `dist.ini` just to give
@jagtalon something to do this week. :D