Scroll to navigation

Prima::Widget::Time(3) User Contributed Perl Documentation Prima::Widget::Time(3)

NAME

Prima::Widget::Time - standard time input widget

SYNOPSIS

        use Prima qw(Application Widget::Time);
        my $mw = Prima::MainWindow->new;
        $mw->insert( 'Widget::Time' =>
                pack => { fill => 'x', pad => 20 },
        );
        run Prima;

DESCRIPTION

Standard time input widget derived from the "Prima::InputLine" class.

API

Methods

Converts the TIME to a string representation according to the current "format" string
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" .

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.

Properties

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>).

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.

Default value: today's time.

AUTHOR

Dmitry Karasik, <dmitry@karasik.eu.org>.

SEE ALSO

Prima::InputLine

2024-08-20 perl v5.40.0