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