Bjørn-Olav Strand
and 1 contributors

NAME

DateTime::Format::Duration::DurationString - JIRA style parsing of duration

VERSION

Version 0.04

SYNOPSIS

  package MyApp;
  use DateTime::Format::Duration::DurationString;
  
  my $seconds  = DateTime::Format::Duration::DurationString->new()->parse('1d 3h')->to_seconds;
  my $duration = DateTime::Format::Duration::DurationString->new()->parse('1d 3h')->to_duration;

DESCRIPTION

DateTime::Format::Duration::DurationString parses a string and returns a duration.

to_seconds

Return this object as seconds

to_duration

Return this object as a DateTime::Duration

parse

Parse a string

TODO

Parsestring in constructor?

SEE ALSO

DateTime, DateTime::Duration and DateTime::Format::Duration

AUTHOR

Bjorn-Olav Strand <bo@startsiden.no>

LICENSE

Copyright 2009 by ABC Startsiden AS, Bjørn-Olav Strand <bo@startsiden.no>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.