|format||Choose what format the extracted date(s) will be. The default is DateTime, which will return DateTime object(s). Other option include verbatim (return the original text), or epoch (return Unix timestamp).|
Only relevant when C,format> is set to DateTime.
Forces a particular time zone to be set (this actually matters, as tomorrow on Monday at 11 PM means something different than tomorrow on Tuesday at 1 AM).
By default it will use the floating time zone. See the documentation for DateTime.
This controls both the input time zone and output time zone.
This argument decides what happens when an ambiguous date appears in the
input. For example, Friday may refer to any number of Fridays. The valid
options for this argument are:
If the text has multiple possible dates, then this argument determines which
date will be returned. By default its first.
Takes an arbitrary amount of text and extracts one or more dates from it. The return value will be zero or more dates, which by default are DateTime objects (but can be customized with the format argument). If called in scalar context, only one will be returned, even if the returns argument specifies multiple possible return values.
See the documentation of new for the configuration of this method. Any arguments passed into this method will trump those from the constructor.
You may reuse a parser for multiple calls to extract.
You do not need to have an instantiated Date::Extract object to call this method. Just Date::Extract->extract($foo) will work.
o today; tomorrow; yesterday o last Friday; next Monday; previous Sat o Monday; Mon o November 13th, 1986; Nov 13, 1986 o 13 November 1986; 13 Nov 1986 o November 13th; Nov 13 o 13 Nov; 13th November o 1986/11/13; 1986-11-13 o 11-13-86; 11/13/1986
This module is intentionally very simple. Surprises are not welcome here.
DateTime::Format::Natural, Time::ParseDate, Date::Manip
Shawn M Moore, <sartak at bestpractical dot com>
Thanks to Steven Schubiger for writing the fine DateTime::Format::Natural. We still use it, but it doesnt quite fill all the particular needs we have.
Copyright 2007-2009 Best Practical Solutions.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||DATE::EXTRACT (3)||2014-06-05|