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

VERSION

9       version 2.07
10

SYNOPSIS

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

DESCRIPTION

45       Ensure input can later be inflated to a DateTime object.
46

METHODS

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

AUTHOR

58       Carl Franks, "cfranks@cpan.org"
59

LICENSE

61       This library is free software, you can redistribute it and/or modify it
62       under the same terms as Perl itself.
63

AUTHOR

65       Carl Franks <cpan@fireartist.com>
66
68       This software is copyright (c) 2018 by Carl Franks.
69
70       This is free software; you can redistribute it and/or modify it under
71       the same terms as the Perl 5 programming language system itself.
72
73
74
75perl v5.32.1                      2021-01-H2T7ML::FormFu::Constraint::DateTime(3)
Impressum