| COUNTDOWN Author: Michael Hartman |
|
Download... The Zipfile includes Classfile, Source code and instructions. 16.6Kb |
Countdown Clock v1.1 Aug 6, 1996
Copyright (C) 1996 Michael Hartman hartmms@eng.auburn.edu
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Based on CTC5 Countdown Clock
CTC5 Countdown Clock
by Tom Carlson tcarlson@ncsc.dni.us
Description:
This counter will countdown to the specified time if it is in the future and countup if it is in thw past. It is just like the countdown clock NASA uses.
Usage:
You must provide a Year, Month, and Day to the targer date.
You can optionally specify an hour (in 0-23 format), minute and
second as well, but they default to 0 if you don't. For those of
you in the U.S.A, you can specify if the target time is during
daylight savings time: otherwise it defaults to regular time.
You can optionally specify the time zone the event will occur in.
Example values are: Eastern=5 Central=6 Mountain=7 West=8.
In addition to this, you can specify what the applet will display
at the bottom of your viewer and where it will point the
browser to go when the user clicks on the applet.
(I use it to provide a link to the source file.)
There is also an option to specify a font to use. I have included only
one font, called lcdb0. You can create your own fonts, but make sure
they are the correct size.
colon image: 21 x 9 (in pixels)
all other images: 21 x 16 (in pixels)
Example:
The counter will count to Dec 13, 1996 at 1:00pm:
My graduation date from college :)
<applet code="countdown.class" width=203 height=21>
<param name=text value="Click on me to view my source">
<param name=font value="lcdb0">
<param name=dest value="countdown.java">
<param name=year value=96>
<param name=month value=12>
<param name=day value=13>
<param name=hour value=13>
<param name=timezone value=6>
</applet>
You can also put the files in their own directory. If you do this, you must change the first line of the applet tag to look like this:
<applet codebase="directory name" code="countdown.class" width=203 height=21>
Drawbacks:
When the rollover occurs, the counter skips a second. This problem seems to be a result of the way Java uses its multithreading capabilities. Please email me if you can help fix this.
Since the Java setYear returns only the last 2 digits of the year, I add 19 to the value. Obviously when the applet is run in the year 2000 and after, it will not work correctly. The code will have to be altered and re-compiled then.
Updates:
Keep an eye out on http://www.eng.auburn.edu/~hartmms/countdown.html for any new versions and updates.