1HTML::FormFu::Deflator:U:sSetrrfCtoinmter(i3b)uted PerlHDToMcLu:m:eFnotramtFiuo:n:Deflator::Strftime(3)
2
3
4

NAME

6       HTML::FormFu::Deflator::Strftime - Strftime deflator
7

VERSION

9       version 2.07
10

SYNOPSIS

12           $form->deflator( Strftime => 'start_time' )
13               ->strftime( '%d/%m/%Y' );
14
15           ---
16           elements:
17               - type: Text
18                 inflators:
19                     - type: DateTime
20                       parser:
21                           strptime: "%Y/%m/%d"
22                 deflator:
23                     - type: Strftime
24                       strftime: "%Y/%m/%d"
25

DESCRIPTION

27       Strftime deflator for DateTime objects.
28
29       When you redisplay a form to the user following an invalid submission,
30       any fields with DateTime inflators will stringify to something like
31       '1970-01-01T00:00:00'. In most cases it makes more sense to use the
32       same format you've asked the user for. This deflator allows you to
33       specify a more suitable and user-friendly format.
34
35       This deflator calls DateTime's "strftime" method. Possible values for
36       the format string are documented at
37       <http://search.cpan.org/dist/DateTime/lib/DateTime.pm#strftime_Patterns>.
38
39       If you set the form's locale (see "locale" in HTML::FormFu) this is set
40       on the DateTime object. Now you can use %x to get the default date or
41       %X for the default time for the object's locale.
42

AUTHOR

44       Carl Franks, "cfranks@cpan.org"
45

LICENSE

47       This library is free software, you can redistribute it and/or modify it
48       under the same terms as Perl itself.
49

AUTHOR

51       Carl Franks <cpan@fireartist.com>
52
54       This software is copyright (c) 2018 by Carl Franks.
55
56       This is free software; you can redistribute it and/or modify it under
57       the same terms as the Perl 5 programming language system itself.
58
59
60
61perl v5.32.0                      2020-07-28HTML::FormFu::Deflator::Strftime(3)
Impressum