aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-Time-Duration-Parse/pkg-descr
blob: 6dae9a2938b195c34a30bfe19299a0d54a3cdfc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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