DateTime::Format::Strftimeq - Format DateTime object using DateTimeX::strftimeq
This document describes version 0.001 of DateTime::Format::Strftimeq (from Perl distribution DateTime-Format-Strftimeq), released on 2019-11-19.
use DateTime::Format::Strftimeq; my $format = DateTime::Format::Strftimeq->new( # time_zone => '...', # optional, default is DateTime object's time zone format => '%Y-%m-%d%( $_->day_of_week == 7 ? "su" : "" )q', ); my $dt1 = DateTime->new(year=>2019, month=>11, day=>19); my $dt1 = DateTime->new(year=>2019, month=>11, day=>24); say $format->format_datetime($dt1); # 2019-11-19 say $format->format_datetime($dt1); # 2019-11-24su
This module formats DateTime objects using DateTimeX::strftimeq.
Required. Will be passed to strftimeq.
Optional. Used to force the time zone of DateTime objects to be formatted. Either string containing time zone name (e.g. "Asia/Jakarta", "UTC") or DateTime::TimeZone object. Will be converted to DateTime::TimeZone internally.
The default is to use the DateTime object's time zone.
Usage:
DateTime::Format::ISO8601::Format->new(%attrs) => obj
$format->format_datetime($dt) => str
Please visit the project's homepage at https://metacpan.org/release/DateTime-Format-Strftimeq.
Source repository is at https://github.com/perlancar/perl-DateTime-Format-Strftimeq.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=DateTime-Format-Strftimeq
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.
DateTimeX::strftimeq
perlancar <perlancar@cpan.org>
This software is copyright (c) 2019 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.
To install DateTime::Format::Strftimeq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DateTime::Format::Strftimeq
CPAN shell
perl -MCPAN -e shell install DateTime::Format::Strftimeq
For more information on module installation, please visit the detailed CPAN module installation guide.