[Opensrf-commits] r1715 - trunk/src/perl/lib/OpenSRF (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jun 4 12:36:52 EDT 2009


Author: miker
Date: 2009-06-04 12:36:49 -0400 (Thu, 04 Jun 2009)
New Revision: 1715

Modified:
   trunk/src/perl/lib/OpenSRF/Utils.pm
Log:
teach interval_to_seconds about HH:MM:SS format time intervals

Modified: trunk/src/perl/lib/OpenSRF/Utils.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/Utils.pm	2009-06-04 16:33:43 UTC (rev 1714)
+++ trunk/src/perl/lib/OpenSRF/Utils.pm	2009-06-04 16:36:49 UTC (rev 1715)
@@ -255,6 +255,8 @@
 	my $self = shift;
         my $interval = shift || $self;
 
+	$interval =~ s/(\d{2}):(\d{2}):(\d{2})/ $1 h $2 min $3 s /go;
+
         $interval =~ s/and/,/g;
         $interval =~ s/,/ /g;
 



More information about the opensrf-commits mailing list