Prima::Widget::Date - standard date picker widget
use Prima qw(Application Widget::Date); my $mw = Prima::MainWindow->new; $mw->insert( 'Widget::Date' => pack => { fill => 'x', pad => 20 }, ); run Prima;
Standard date picker widget, derived from the Prima::InputLine class.
Prima::InputLine
Converts the DATE to a string representation according to the current format string
format
Returns a string to be used in format where the string is constructed to reflect the formatting of the regional date preferences.
See also: man 3 strftime, %x .
man 3 strftime, %x
Tries to extract the date from the STRING, assuming it is constructed according to the current format string. Doesn't fail but values that could not be extracted are assigned to today's day/month/year instead.
Returns today's date in widgets [D,M,Y] format
Checks if D, M, Y form a valid date, and adjusts the values if not. Returns the corrected values.
Accepts three integers / arrayref with three integers in the format of localtime. DAY can be from 1 to 31, MONTH from 0 to 11, YEAR from 0 to 199.
localtime
Default value: today's date.
Selects the day of the month.
The format string is used when converting the date to its visual interpretation, also with regional preferences, f ex YYYY-MM-DD or DD/MM/YY. The syntax of the format is verbatim as this, i e it recognizes fixed patterns YYYY, YY, MM, and DD, replacing them with the date values.
Selects the month.
Selects the year.
Dmitry Karasik, <dmitry@karasik.eu.org>.
Prima::ComboBox, Prima::Calendar
To install Prima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Prima
CPAN shell
perl -MCPAN -e shell install Prima
For more information on module installation, please visit the detailed CPAN module installation guide.