1Prima::Widget::Date(3)User Contributed Perl DocumentationPrima::Widget::Date(3)
2
3
4
6 Prima::Widget::Date - date picker widget
7
9 use Prima qw(Application Widget::Date);
10
11 my $mw = Prima::MainWindow->new;
12 $mw->insert( 'Widget::Date' =>
13 pack => { fill => 'x', pad => 20 },
14 );
15
16 run Prima;
17
19 Standard date picker
20
22 Methods
23 date2str DATE
24 Converts DATE 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 date formatting
30 preferences.
31
32 See also: "man 3 strftime, %x" .
33
34 str2date STRING
35 Tries to extract date 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 today's day/month/year
38 instead.
39
40 today
41 Returns today's date in widgets [D,M,Y] format
42
43 validate_date D, M, Y
44 Checks whether D, M, Y values are valid and within understood
45 range; adjusts the values if not. Returns the final values.
46
47 Properties
48 date DAY, MONTH, YEAR | [ DAY, MONTH, YEAR ]
49 Accepts three integers / arrayref with three integers in format of
50 "localtime". DAY can be from 1 to 31, MONTH from 0 to 11, YEAR
51 from 0 to 199.
52
53 Default value: today's date.
54
55 day INTEGER
56 Selects the day in month.
57
58 format STRING
59 The format string is used when converting date to its visual
60 interpretation, also with regional preferences, like YYYY-MM-DD or
61 DD/MM/YY. The syntax of the format is exctly this, it recognizes
62 fixed patterns YYYY, YY, MM, and DD, replacing them with the date
63 values.
64
65 month
66 Selects the month.
67
68 year
69 Selects the year.
70
72 Dmitry Karasik, <dmitry@karasik.eu.org>.
73
75 Prima::ComboBox, Prima::Calendar
76
77
78
79perl v5.38.0 2023-07-21 Prima::Widget::Date(3)