Prima::Widget::Time - standard time input widget
use Prima qw(Application Widget::Time); my $mw = Prima::MainWindow->new; $mw->insert( 'Widget::Time' => pack => { fill => 'x', pad => 20 }, ); run Prima;
Standard time input widget derived from the Prima::InputLine class.
Prima::InputLine
Converts the TIME 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 time preferences.
See also: man 3 strftime, %X .
man 3 strftime, %X
Tries to extract time from STRING, assuming it is constructed according to the current format string. Doesn't fail but values that could not be extracted are assigned to the current second/minute/hour instead.
Checks whether S, M, H form a valid point in time, adjusts the values if not. Returns the corrected values.
The format string is used when converting the time to its visual interpretation, also with regional preferences, f ex hh:mm:ss or hh:mm:AA . The syntax of the format is verbatim as this, i e it recognizes fixed patterns hh, mm, ss, aa, and AA, replacing them with the time values.
(aa is for <am / pm>, AA is for <AM / PM>).
aa
AA
Selects the hour.
Selects the minute.
Selects the second
Accepts three integers / arrayref with three integers in the format of localtime. SEC and MIN can be from 0 to 59, and HOUR from 0 to 23.
localtime
Default value: today's time.
Dmitry Karasik, <dmitry@karasik.eu.org>.
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.