README

NAME

Time::Duration::Parser - Parse duration strings into seconds

SYNOPSIS

use Time::Duration::Parser;

my $time-string = "5 days 4 hours 52 minutes 3 seconds";
my $s = duration-to-seconds($time-string);
say "$time-string -> $s seconds";

DESCRIPTION

Time::Duration::Parser is a module exports a single subroutine duration-to-seconds that turns a string like "3 days 29 minutes" into a number of seconds.

Note, for months and years the values are approximated as 30 days and 365 days respectively.

AUTHOR

Jonathan Scott Duff

Source can be located at: https://github.com/raku-community-modules/Time-Duration-Parser . Comments and Pull Requests are welcome.

COPYRIGHT AND LICENSE

Copyright 2017 Jonathan Scott Duff

Copyright 2018 - 2022 Raku Community

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Time::Duration::Parser v0.0.3

Parse duration strings into seconds

Authors

    License

    Artistic-2.0

    Dependencies

    Test Dependencies

    Provides

    • Time::Duration::Parser

    Documentation

    The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.