HTML::FormHandlerX::Field::DateTimeNatural - a datetime field with natural language parsing.
version v0.5
This field is a simple text input field type, but it understands natural language and dates. Most of the functionality is inherited from DateTime::Format::Natural. To see a list of dates it can understand see DateTime::Format::Natural::Lang::EN.
has_field 'date' => ( type => 'DateTimeNatural', time_zone => 'UTC', # optional );
This field supports all of the methods inherited from HTML::FormHandler::Field::Text, as well as all of the parameters offered by DateTime::Format::Natural, all of which are optional.
In addition to that, it will try to obtain the values for these attributes from the parent form class. E.g. you can set the time_zone attribute on the form class, and all of the DateTimeNatural fields will automatically have the time zone set.
time_zone
DateTimeNatural
Here is the list of the methods, please refer to original module for their description:
datetime
lang
format
prefer_future
daytime
HTML::FormHandler
HTML::FormHandler::Field::Text
DateTime::Format::Natural
DateTime::Format::Natural::Lang::EN
Roman F. <romanf@cpan.org>
This software is copyright (c) 2012 by Roman F..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install HTML::FormHandlerX::Field::DateTimeNatural, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::FormHandlerX::Field::DateTimeNatural
CPAN shell
perl -MCPAN -e shell install HTML::FormHandlerX::Field::DateTimeNatural
For more information on module installation, please visit the detailed CPAN module installation guide.