Acme-CPANModules-FormattingDate
view release on metacpan or search on metacpan
strftime (and variants)
The POSIX module provides the strftime() routine which lets you format
using a template string containing sprintf-style conversions like %Y
(for 4-digit year), %m (2-digit month number from 1-12), and so on.
There's also Date::strftimeq which provides an extension to this.
You can actually add some modifiers for the conversions to set
width/zero-padding/alignment, like you can do with sprintf (e.g. %03d
supposing you want 3-digit day of month numbers). But this feature is
platform-dependent.
yyyy-mm-dd template
This "yyyy-mm-dd" (for lack of a better term) format is much more
commonly used in the general computing world, from spreadsheets to
desktop environment clocks. And this format is probably older than
strftime. The template is more intuitive to use for people as it gives a
clear picture of how wide each component (and the whole string) will be.
other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps
required beyond that are considered a bug and can be reported to me.
COPYRIGHT AND LICENSE
This software is copyright (c) 2023 by perlancar <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.
BUGS
Please report any bugs or feature requests on the bugtracker website
<https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModules-Form
attingDate>
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.
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
**strftime (and variants)**
The <pm:POSIX> module provides the `strftime()` routine which lets you format
using a template string containing sprintf-style conversions like `%Y` (for
4-digit year), `%m` (2-digit month number from 1-12), and so on. There's also
<pm:Date::strftimeq> which provides an extension to this.
You can actually add some modifiers for the conversions to set
width/zero-padding/alignment, like you can do with sprintf (e.g. `%03d`
supposing you want 3-digit day of month numbers). But this feature is
platform-dependent.
**yyyy-mm-dd template**
This "yyyy-mm-dd" (for lack of a better term) format is much more commonly used
in the general computing world, from spreadsheets to desktop environment clocks.
And this format is probably older than strftime. The template is more intuitive
to use for people as it gives a clear picture of how wide each component (and
the whole string) will be.
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
B<strftime (and variants)>
The L<POSIX> module provides the C<strftime()> routine which lets you format
using a template string containing sprintf-style conversions like C<%Y> (for
4-digit year), C<%m> (2-digit month number from 1-12), and so on. There's also
L<Date::strftimeq> which provides an extension to this.
You can actually add some modifiers for the conversions to set
width/zero-padding/alignment, like you can do with sprintf (e.g. C<%03d>
supposing you want 3-digit day of month numbers). But this feature is
platform-dependent.
B<yyyy-mm-dd template>
This "yyyy-mm-dd" (for lack of a better term) format is much more commonly used
in the general computing world, from spreadsheets to desktop environment clocks.
And this format is probably older than strftime. The template is more intuitive
to use for people as it gives a clear picture of how wide each component (and
the whole string) will be.
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2023 by perlancar <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.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModules-FormattingDate>
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.
=cut
( run in 0.245 second using v1.01-cache-2.11-cpan-4d50c553e7e )