1Prima::Widget::Time(3)User Contributed Perl DocumentationPrima::Widget::Time(3)
2
3
4
6 Prima::Widget::Time - time inputline
7
9 use Prima qw(Application Widget::Time);
10
11 my $mw = Prima::MainWindow->new;
12 $mw->insert( 'Widget::Time' =>
13 pack => { fill => 'x', pad => 20 },
14 );
15
16 run Prima;
17
19 Standard time inputline
20
22 Methods
23 time2str TIME
24 Converts TIME to string representation according to the current
25 "format" string
26
27 default_format
28 Returns a string to be used in "format", where the string is
29 constructed in such a way to reflect regional time formatting
30 preferences.
31
32 See also: "man 3 strftime, %X" .
33
34 str2time STRING
35 Tries to extract time from STRING assuming it is constructed
36 according to the current "format" string. Doesn't fail but values
37 that could not be extracted are assigned to current
38 second/minute/hour instead.
39
40 validate_time S, M, H
41 Checks whether S, M, H values are valid and within understood
42 range; adjusts the values if not. Returns the final values.
43
44 Properties
45 format STRING
46 The format string is used when converting time to its visual
47 interpretation, also with regional preferences, like hh:mm:ss or
48 hh:mm:AA . The syntax of the format is exctly this, it recognizes
49 fixed patterns hh, mm, ss, aa, and AA, replacing them with the time
50 values.
51
52 ("aa" is for <am / pm>, "AA" is for <AM / PM>).
53
54 hour
55 Selects the hour.
56
57 minute
58 Selects the minute.
59
60 second INTEGER
61 Selects the second
62
63 time SEC, MIN, HOUR | [ SEC, MIN, HOUR ]
64 Accepts three integers / arrayref with three integers in format of
65 "localtime". SEC and MIN can be from 0 to 59, HOUR from 0 to 23.
66
67 Default value: today's time.
68
70 Dmitry Karasik, <dmitry@karasik.eu.org>.
71
73 Prima::InputLine
74
75
76
77perl v5.36.0 2023-03-20 Prima::Widget::Time(3)