DateTime::Format::DurationFormat and parse DateTime::Durations | |
Download |
DateTime::Format::Duration Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Rick Measham
- Publisher web site:
- http://search.cpan.org/~rickm/
DateTime::Format::Duration Tags
DateTime::Format::Duration Description
Format and parse DateTime::Durations DateTime::Format::Duration is a Perl module that formats and parses DateTime::Duration objects as well as other durations representations.SYNOPSIS use DateTime::Format::Duration; $d = DateTime::Format::Duration->new( pattern => '%Y years, %m months, %e days, '. '%H hours, %M minutes, %S seconds' ); print $d->format_duration( DateTime::Duration->new( years => 3, months => 5, days => 1, hours => 6, minutes => 15, seconds => 45, nanoseconds => 12000 ) ); # 3 years, 5 months, 1 days, 6 hours, 15 minutes, 45 seconds $duration = $d->parse_duration( '3 years, 5 months, 1 days, 6 hours, 15 minutes, 45 seconds' ); # Returns DateTime::Duration object print $d->format_duration_from_deltas( years => 3, months => 5, days => 1, hours => 6, minutes => 15, seconds => 45, nanoseconds => 12000 ); # 3 years, 5 months, 1 days, 6 hours, 15 minutes, 45 seconds ltas = $d->parse_duration_as_deltas( '3 years, 5 months, 1 days, 6 hours, 15 minutes, 45 seconds' ); # Returns hash: # (years=>3, months=>5, days=>1, hours=>6, minutes=>15, seconds=>45) Requirements: · Perl
DateTime::Format::Duration Related Software