From: miker Date: Thu, 4 Jun 2009 16:36:49 +0000 (+0000) Subject: teach interval_to_seconds about HH:MM:SS format time intervals X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=41ef975358cc6e40ca93021680cd96518c2b490f;p=working%2FOpenSRF.git teach interval_to_seconds about HH:MM:SS format time intervals git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1715 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perl/lib/OpenSRF/Utils.pm b/src/perl/lib/OpenSRF/Utils.pm index b6e24d5..01ced81 100644 --- a/src/perl/lib/OpenSRF/Utils.pm +++ b/src/perl/lib/OpenSRF/Utils.pm @@ -255,6 +255,8 @@ sub interval_to_seconds { 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;