The role tests failed with Perl <5.17.10 installs, due to the used
File::Temp (<0.23) still caring about the casing of the
arguments. Newer versions of File::Temp no longer care about the
casing.
By uppercasing 'suffix' in the tests, we make the tests pass for both
Perl 5.16 and Perl 5.18.
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.
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.