1HTML::FormFu::ConstrainUts:e:rDaCtoenTtirmieb(u3t)ed PerHlTMDLo:c:uFmoernmtFaut:i:oCnonstraint::DateTime(3)
2
3
4

NAME

6       HTML::FormFu::Constraint::DateTime - DateTime constraint
7

SYNOPSIS

9           ---
10           elements:
11             - type: Text
12               name: start_date
13               constraints:
14                 - type: DateTime
15                   parser:
16                     strptime: '%d-%m-%Y'
17
18             - type: Text
19               name: end_time
20               constraints:
21                 - type: DateTime
22                   parser:
23                     regex: !!perl/regexp '^(\d{2}) - (\d{2}) - (\d{4})$'
24                     params: [day, month, year]
25
26       An example of using the same parser declaration for both a DateTime
27       constraint and a DateTime inflator, using YAML references:
28
29           ---
30           elements:
31             - type: Text
32               name: date
33               constraints:
34                 - type: DateTime
35                   parser: &PARSER
36                     strptime: '%d-%m-%Y'
37               inflators:
38                 - type: DateTime
39                   parser: *PARSER
40

DESCRIPTION

42       Ensure input can later be inflated to a DateTime object.
43

METHODS

45   parser
46       Arguments: \%args
47
48       Required. Define the expected input string, so
49       DateTime::Format::Builder knows how to turn it into a DateTime object.
50
51       Accepts arguments to be passed to "parser" in
52       DateTime::Format::Builder.
53

AUTHOR

55       Carl Franks, "cfranks@cpan.org"
56

LICENSE

58       This library is free software, you can redistribute it and/or modify it
59       under the same terms as Perl itself.
60
61
62
63perl v5.12.1                      2010-05-H2T3ML::FormFu::Constraint::DateTime(3)
Impressum