NAME

DateTime::Format::Duration::ISO8601 - Format DateTime::Duration object as ISO8601 duration string

VERSION

This document describes version 0.002 of DateTime::Format::Duration::ISO8601 (from Perl distribution DateTime-Format-Duration-ISO8601), released on 2016-06-29.

SYNOPSIS

use DateTime::Format::Duration::ISO8601;

my $d = DateTime::Format::Duration::ISO8601->new;
say $d->format_duration(
    DateTime::Duration->new(years=>3, months=>5, seconds=>10),
); # => P3Y5MT10S

DESCRIPTION

METHODS

new

format_duration($dur_obj) => str

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/DateTime-Format-Duration-ISO8601.

SOURCE

Source repository is at https://github.com/perlancar/perl-DateTime-Format-Duration-ISO8601.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=DateTime-Format-Duration-ISO8601

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

DateTime::Format::ISO8601 to format DateTime object into ISO8601 date/time string. At the time of this writing, there is no support to format DateTime::Duration object, hence this module.

DateTime::Format::Duration to format DateTime::Duration object using strftime-style formatting.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

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