1HTML::FormFu::Inflator:U:sCeormpCoounntdrDiabtuetHTeTidMmLeP:(e:3rF)lorDmoFcuu:m:eInntfaltaitoonr::CompoundDateTime(3)
2
3
4
6 HTML::FormFu::Inflator::CompoundDateTime - CompoundDateTime inflator
7
9 version 2.07
10
12 ---
13 element:
14 - type: Multi
15 name: date
16
17 elements:
18 - name: day
19 - name: month
20 - name: year
21
22 inflator:
23 - type: CompoundDateTime
24
25 # get the submitted value as a DateTime object
26
27 my $date = $form->param_value('date');
28
30 For use with a HTML::FormFu::Element::Multi group of fields.
31
32 Changes the input from several fields into a single DateTime value.
33
34 By default, expects the field names to be any of the following:
35
36 year
37 month
38 day
39 hour
40 minute
41 second
42 nanosecond
43 time_zone
44
46 field_order
47 Arguments: \@order
48
49 If your field names doesn't follow the convention listed above, you
50 must provide an arrayref containing the above names, in the order they
51 correspond with your own fields.
52
53 ---
54 element:
55 - type: Multi
56 name: date
57
58 elements:
59 - name: m
60 - name: d
61 - name: y
62
63 inflator:
64 - type: CompoundDateTime
65 field_order:
66 - month
67 - day
68 - year
69
70 strptime
71 Arguments: \%args
72
73 Arguments: $string
74
75 Optional. Define the format that should be used if the DateTime object
76 is stringified.
77
78 Accepts a hashref of arguments to be passed to "new" in
79 DateTime::Format::Strptime. Alternatively, accepts a single string
80 argument, suitable for passing to "DateTime::Format::Strptime->new(
81 pattern => $string )".
82
83 ---
84 inflator:
85 - type: CompoundDateTime
86 strptime:
87 pattern: '%d-%b-%Y'
88 locale: de
89
90 ---
91 inflator:
92 - type: CompoundDateTime
93 strptime: '%d-%m-%Y'
94
96 Carl Franks
97
99 This library is free software, you can redistribute it and/or modify it
100 under the same terms as Perl itself.
101
103 Carl Franks <cpan@fireartist.com>
104
106 This software is copyright (c) 2018 by Carl Franks.
107
108 This is free software; you can redistribute it and/or modify it under
109 the same terms as the Perl 5 programming language system itself.
110
111
112
113perl v5.32.0 20H2T0M-L0:7:-F2o8rmFu::Inflator::CompoundDateTime(3)