##############################################################################
#                           Countdown v1.1                                   #
#                      Countdown Timer Script                                #
#                                                                            #
#                         Scripts Archive                                    #
#                    https://worldwidemart.com/scripts/                      #
##############################################################################

DESCRIPTION
-----------
Countdown displays the time remaining until a specified date/time.
Originally popular for Y2K millennium countdowns in the late 1990s.

FEATURES
--------
* Countdown to any future date
* Text or image output modes
* Configurable display units (years, months, days, hours, minutes, seconds)
* URL parameter support
* SSI compatible

REQUIREMENTS
------------
* Unix-based web server with CGI support
* Perl 5.x or higher
* Time::Local module (usually included)
* POSIX module (usually included)

INSTALLATION
------------
1. Upload countdown.pl to your cgi-bin directory
2. Set permissions: chmod 755 countdown.pl
3. Edit configuration variables for your target date
4. Optional: Create digit images directory for image mode
5. Add to your page using SSI or iframe

USAGE EXAMPLES
--------------
Basic text countdown:
  <!--#include virtual="/cgi-bin/countdown.pl" -->

Countdown to specific date:
  <!--#include virtual="/cgi-bin/countdown.pl?year=2025&month=12&day=25" -->

With URL parameters:
  /cgi-bin/countdown.pl?year=2025&month=1&day=1&hour=0&min=0

CONFIGURATION
-------------
$target_year   - Year to count down to (e.g., 2025)
$target_month  - Month (1-12)
$target_day    - Day (1-31)
$target_hour   - Hour (0-23)
$target_min    - Minute (0-59)
$output_type   - 'text' or 'image'

HISTORICAL NOTE
---------------
The Y2K countdown was perhaps the most common use of this script.
Millions of websites displayed countdowns to January 1, 2000.

MODERN ALTERNATIVES
-------------------
For modern countdowns, use JavaScript:

Simple countdown:
  const target = new Date('2025-12-31T23:59:59');
  setInterval(() => {
    const diff = target - new Date();
    const days = Math.floor(diff / 86400000);
    const hours = Math.floor((diff % 86400000) / 3600000);
    const mins = Math.floor((diff % 3600000) / 60000);
    const secs = Math.floor((diff % 60000) / 1000);
    document.getElementById('countdown').textContent =
      `${days}d ${hours}h ${mins}m ${secs}s`;
  }, 1000);

Libraries:
* Day.js (https://day.js.org)
* Luxon (https://moment.github.io/luxon)
* FlipClock.js (https://flipclockjs.com)
* Countdown.js

CSS animations:
* Flip countdown animations with CSS 3D transforms
* Animated number transitions

LICENSE
-------
Artistic License

##############################################################################
