NAME
Tk::Clock - Clock widget with analog and digital display
SYNOPSIS
use Tk use Tk::Clock;
$clock = $parent->Clock (?-option => <value> ...?);
$clock->config ( # These reflect the defaults handColor => "Green4", secsColor => "Green2", tickColor => "Yellow4", timeFont => "fixed", timeColor => "Red4", timeFormat => "HH.MM:SS", dateFont => "fixed", dateColor => "Blue4", dateFormat => "dd-mm-yy");
DESCRIPTION
Create a clock canvas with both an analog- and a digital display
Legal dateFormat characters are d and dd for date, m and mm for month, y and yy for year and any separators :, -, / or space.
Legal timeFormat characters are H and HH for hour, h and hh for AM/PM hour, M and MM for minutes, S and SS for seconds, A for AM/PM indicator and any separators :, -, . or space.
BUGS
If the system load's too high, the clock might skip some seconds.
Due to the fact that the year is expressed in 2 digit's, this widget is not (yet) Y2K compliant.
ddd and dddd for the (abbreviated) day of the week and mmm and mmmm for the (abbreviated) month are not (yet) supported.
There's no check if either format will fit in the given space.
TODO
* Scalability would be a nice feature. * Using POSIX' strftima () for dateFormat. Current implementation would probably make this very slow.
AUTHOR
H.Merijn Brand <merijn@hempseed.com>
Thanks to Larry Wall for inventing perl. Thanks to Nick Ing-Simmons for providing perlTk. Thanks to Achim Bohnet for introducing me to OO (and converting the basics of my clock.pl to clock.pm). Thanks to Sriram Srinivasan for understanding OO though his Panther book.