[Bps-public-commit] r9928 - in Date-Extract: lib/Date

sartak at bestpractical.com sartak at bestpractical.com
Thu Dec 13 01:35:58 EST 2007


Author: sartak
Date: Thu Dec 13 01:35:57 2007
New Revision: 9928

Added:
   Date-Extract/Changes
Modified:
   Date-Extract/   (props changed)
   Date-Extract/Makefile.PL
   Date-Extract/README
   Date-Extract/lib/Date/Extract.pm

Log:
 r48967 at onn:  sartak | 2007-12-13 01:34:23 -0500
 Prepare for 0.01 release


Added: Date-Extract/Changes
==============================================================================
--- (empty file)
+++ Date-Extract/Changes	Thu Dec 13 01:35:57 2007
@@ -0,0 +1,5 @@
+Revision history for Date-Extract
+
+0.01    Thu Dec 13 01:29:12 EDT 2007
+        First version, released on an unsuspecting world.
+

Modified: Date-Extract/Makefile.PL
==============================================================================
--- Date-Extract/Makefile.PL	(original)
+++ Date-Extract/Makefile.PL	Thu Dec 13 01:35:57 2007
@@ -8,8 +8,8 @@
 requires       'List::Util';
 requires       'Carp';
 
-# this actually requires DTFN + a patch for timezone handling
-requires       'DateTime::Format::Natural' => '0.58';
+# 0.60 adds time zone handling
+requires       'DateTime::Format::Natural' => '0.60';
 
 requires       'parent';
 requires       'Class::Data::Inheritable';

Modified: Date-Extract/README
==============================================================================
--- Date-Extract/README	(original)
+++ Date-Extract/README	Thu Dec 13 01:35:57 2007
@@ -2,7 +2,7 @@
     Date::Extract - extract probable dates from strings
 
 VERSION
-    Version 0.00 released ???
+    Version 0.01 released 13 Dec 07
 
 SYNOPSIS
         my $parser = Date::Extract->new();
@@ -49,7 +49,7 @@
             Prefer the closest future date.
 
         past
-            Prefer the closest past date.
+            Prefer the closest past date. NOT YET SUPPORTED.
 
     returns
         If the text has multiple possible dates, then this argument
@@ -78,10 +78,10 @@
         This method will combine the arguments of parser->new and extract.
         Modify the "to" hash directly.
 
-  extract text => "DateTime", ARGS
+  extract, ARGS text => "DateTime"s
         Takes an arbitrary amount of text and extracts one or more dates
         from it. The return value will be zero or more "DateTime" objects.
-        If called in scalar context, the first will be returned, even if the
+        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.
@@ -93,6 +93,16 @@
         You do not need to have an instantiated "Date::Extract" object to
         call this method. Just "Date::Extract->extract($foo)" will work.
 
+FORMATS HANDLED
+        today; tomorrow; yesterday
+        last Friday; next Monday; previous Sat
+        Monday; Mon
+        November 13th, 1986; Nov 13, 1986
+        November 13th; Nov 13
+        13 Nov; 13th November
+        1986/11/13; 1986-11-13
+        11-13-86; 11/13/1986
+
 CAVEATS
         This module is *intentionally* very simple. Surprises are *not*
         welcome here.

Modified: Date-Extract/lib/Date/Extract.pm
==============================================================================
--- Date-Extract/lib/Date/Extract.pm	(original)
+++ Date-Extract/lib/Date/Extract.pm	Thu Dec 13 01:35:57 2007
@@ -18,11 +18,11 @@
 
 =head1 VERSION
 
-Version 0.00 released ???
+Version 0.01 released 13 Dec 07
 
 =cut
 
-our $VERSION = '0.00';
+our $VERSION = '0.01';
 
 =head1 SYNOPSIS
 
@@ -82,7 +82,7 @@
 
 =item past
 
-Prefer the closest past date.
+Prefer the closest past date. B<NOT YET SUPPORTED>.
 
 =back
 
@@ -171,11 +171,11 @@
     $to->{time_zone} ||= $from->{time_zone};
 }
 
-=head2 extract text => C<DateTime>, ARGS
+=head2 extract, ARGS text => C<DateTime>s
 
 Takes an arbitrary amount of text and extracts one or more dates from it. The
 return value will be zero or more C<DateTime> objects. If called in scalar
-context, the first will be returned, even if the C<returns> argument specifies
+context, only one will be returned, even if the C<returns> argument specifies
 multiple possible return values.
 
 See the documentation of C<new> for the configuration of this method. Any



More information about the Bps-public-commit mailing list