Date::RangeParser::EN - Parser for plain English date/time range strings
use Date::RangeParser::EN; my $parser = Date::RangeParser::EN->new; my ($begin, $end) = $parser->parse_range("this week");
Parses plain-English strings representing date/time ranges
Returns a new instance of Date::RangeParser::EN.
Takes an optional hash of parameters:
By default, Date::RangeParser::EN returns two DateTime objects representing the beginning and end of the range. If you use a subclass of DateTime (or another module that implements the DateTime API), you may pass the name of this class to use it instead.
By default, Date::RangeParser::EN uses DateTime->now to determine the current date/time for calculations. If you need to work with a different time (for instance, if you need to adjust for time zones), you may pass a callback (code reference) which returns a DateTime object.
Accepts a string representing a plain-English date range, for instance:
Returns two DateTime objects, reprensenting the beginning and end of the range.
There's a lot more that this module could handle. A few items that come to mind:
This module was authored by Grant Street Group (http://grantstreet.com), which was kind enough to give it back to the Perl community.
The CPAN distribution is maintained by Michael Aquilina (email@example.com).
Copyright (C) 2012 Grant Street Group.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.