mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
ad4f267b7a
search.cpan.org is shutting down. It will redirect to metacpan.org after June 25, 2018. With hat: perl
14 lines
441 B
Plaintext
14 lines
441 B
Plaintext
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: https://metacpan.org/release/Time-Duration-Parse
|