Tuesday, March 19 in 2024
Module Frontpage Slideshow
Modul: Countdown
Author: Ralf Hertsch
Nick: Ralf (Berlin)
Contact: hertsch@berlin.de
State: Alpha
Platform: 2.7
Last info: 2011-11-10
Rating:
54.0
713 votes
1 2 3 4 5
Forum: here
Description: This simple snippet could be placed in a code section or in your template wherever you want.

Code:

$today = time();
$dayX = mktime(date('G'), date('i'), 0, 12, 24, 2010);
echo "still " . round(($dayX-$today)/(3600*24),0) . " days before Xmas!";


See also: Countdown

 

The snippet in action:

still -4469 days before Xmas!

and only -4462 days before 2012!

 

We wish you a merry Xmas and a happy new year !