Tk::Date 0.42 review

by on

Tk::Date is a date/time widget for perl/Tk. SYNOPSIS use Tk::Date; $date_widget = $top->Date->pack; $date_widget-

License: Perl Artistic License
File size: 17K
Developer: Slaven Rezic
0 stars award from

Tk::Date is a date/time widget for perl/Tk.


use Tk::Date;
$date_widget = $top->Date->pack;
$date_widget->get("%x %X");

Tk::Date implements a date/time widget. There are three ways to input a date:
Using the keyboard to input the digits and the tab key or the mouse pointer to move focus between fields.

Using up and down cursor keys to increment/decrement the date (only with installed Tk::NumEntryPlain widget).

Selecting up and down arrow buttons will increment or decrement the value of the active field (only with installed Tk::FireButton widget).

The Date/Time Format

Unlike Java, Perl does not have a date/time object. However, it is possible to use the unix time (seconds since epoch, that is 1st January 1970) as a replacement. This is limited, since on most architectures, the valid range is between 14th December 1901 and 19th January 2038. For other dates, it is possible to use a hash notation:

{ y => year,
m => month,
d => day,
H => hour,
M => minute,
S => second }

The abbreviations are derivated from the format letters of strftime. Note that year is the full year (1998 instead of 98) and month is the real month number, as opposed to the output of localtime(), where the month is subtracted by one.

In this document, the first method will be referred as unixtime and the second method as datehash.


Tk::Date descends from Frame and inherits all of its options.


Specified orientation of the increment and decrements buttons. May be vertical (default) or horizontal.


Tk::Date 0.42 keywords