HTML::...::Date(3pm)
π NAME π
okay bestie, you're on the HTML::...::Date(3pm) page (User Contributed Perl Documentation), and it's the manual for HTML::FormHandler::Field::Date β a date field with formats β¨.
π VERSION π
version 0.40068 π
π SUMMARY π
This field may be used with the jQuery Datepicker plugin. π¦
You can specify the format for the date using jQuery formatDate strings or DateTime strftime formats. (Default format is format => '%Y-%m-%d'.) periodt.
dβ"%e"β day of month (no leading zero)ddβ"%d"β day of month (two digit)oβ"%{day_of_year}"β day of the year (no leading zeros)ooβ"%j"β day of the year (three digit)Dβ"%a"β day name shortDDβ"%A"β day name longmβ"%{day_of_month}"β month of year (no leading zero)mmβ"%m"β month of year (two digit)"%m"Mβ"%b"β month name shortMMβ"%B"β month name longyβ"%y"β year (two digit)yyβ"%Y"β year (four digit)@β"%s"β Unix timestamp (ms since 01/01/1970)
For example:
has_field 'start_date' => ( type => 'Date', format => "dd/mm/y" );
or
has_field 'start_date' => ( type => 'Date', format => "%d/%m/%y" );
You can also set date_end and date_start attributes for validation of the date range. Use iso_8601 formats for these dates ("yyyy-mm-dd"); the dates can be specified either as a string, or as a subref; the subref is evaluated at validation time. π
has_field 'start_date' => ( type => 'Date', date_start => "2009-12-25", date_end => sub { DateTime->now->ymd } );
Customize error messages date_early and date_late:
has_field 'start_date' => ( type => 'Date,
messages => { date_early => 'Pick a later date',
date_late => 'Pick an earlier date', } );
β¨ Using with HTML5 β¨
If the field's form has its is_html5 flag active, then the field's rendering behavior changes in two ways:
- It will render as
<input type="date" ... />instead oftype="text". - If the field's format is set to anything other than ISO date format (
%Y-%m-%d), then attempting to render the field will result in a warning.
Note that the default value for the field's format attribute is, in fact, the ISO date format. π
π AUTHOR π
FormHandler Contributors β see HTML::FormHandler.
πΈ COPYRIGHT AND LICENSE πΈ
This software is copyright (c) 2017 by Gerda Shank.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay that's the whole page, bestie π«Ά this one is from perl v5.34.0, dated 2022-03-25, and the manual name is HTML::...::Date(3pm) β mwah π.
π¦ where this page comes from
- debian bookworm: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms