Scroll to navigation

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

NAME

Prima::Widget::Time - time inputline

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 inputline

API

Methods

Converts TIME to string representation according to the current "format" string
Returns a string to be used in "format", where the string is constructed in such a way to reflect regional time formatting 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 current second/minute/hour instead.
Checks whether S, M, H values are valid and within understood range; adjusts the values if not. Returns the final values.

Properties

The format string is used when converting time to its visual interpretation, also with regional preferences, like hh:mm:ss or hh:mm:AA . The syntax of the format is exctly this, 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 format of "localtime". SEC and MIN can be from 0 to 59, HOUR from 0 to 23.

Default value: today's time.

AUTHOR

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

SEE ALSO

Prima::InputLine

2023-09-05 perl v5.26.1