HTML::FormFu::Constraint::DateTime3pm
Datetime constraint
Usage
---elements:- type: Textname: start_dateconstraints:- type: DateTimeparser:strptime: '%d-%m-%Y'- type: Textname: end_timeconstraints:- type: DateTimeparser:regex: !!perl/regexp '^(\d{2}) - (\d{2}) - (\d{4})$'params: [day, month, year]
An example of using the same parser declaration for both a DateTime constraint and a DateTime inflator, using YAML references:
---elements:- type: Textname: dateconstraints:- type: DateTimeparser: &PARSERstrptime: '%d-%m-%Y'inflators:- type: DateTimeparser: *PARSER
Version
version 2.07
Overview
Ensure input can later be inflated to a DateTime object.
Methods
parser
Arguments: \%args
Required. Define the expected input string, so DateTime::Format::Builder knows how to turn it into a DateTime object.
Accepts arguments to be passed to "parser" in DateTime::Format::Builder.
Copyright and license
This software is copyright (c) 2018 by Carl Franks.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Releases
8 releases since Debian 6.0 (Squeeze); the text changed 5 times.