freebsd-ports/devel/p5-Time-Duration-Parse/pkg-descr
Cheng-Lung Sung f7e724f6bb Add p5-Time-Duration-Parse 0.02, parse string that represents time
duration.

PR:		ports/100470
Submitted by:	Gea-Suan Lin <gslin at gslin.org>
2006-07-19 01:08:19 +00:00

13 lines
441 B
Text

Time::Duration::Parse is a module to parse human readable duration
strings like 2 minutes and 3 seconds to seconds.
It does the opposite of duration_exact function in Time::Duration and
is roundtrip safe. So, the following is always true.
use Time::Duration::Parse;
use Time::Duration;
my $seconds = int rand 100000;
is( parse_duration(duration_exact($seconds)), $seconds );
WWW: http://search.cpan.org/dist/Time-Duration-Parse/