Daily Countdown

mannsym - March 21, 2008 - 01:33
Project:Javascript Countdown Timer
Version:5.x-1.8
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:jvandervort
Status:by design
Description

I was just wondeing how hard would it be to have a 24 hour countdown that automatically reset at each completion.
As thought it was on a continuous loop.

#1

jvandervort - March 21, 2008 - 14:51

Well you could do something like this:
use php input format:

<?php
$midnight_today
= date('c',mktime(10, 48, 0, date("m") , date("d"), date("Y")));
?>

<?php print $midnight_today;?><br/>
<span class="countdowntimer"><br />
<span style="display:none" class="datetime"><?php print $midnight_today;?></span><br />
<span style="display:none" class="dir">down</span><br />
<span style="display:none" class="format_txt">%hours%:%mins%:%secs%</span><br />
<span style="display:none" class="complete">MISSION CUPLIDA2! </span><br />
<span style="display:none" class="tc_redir">/</span><br />
</span>

It would use the server timezone, but you could set it to any fixed timezone.
This example is for the 6.x-2.x branch.

#2

jvandervort - March 31, 2008 - 17:35
Assigned to:Anonymous» jvandervort
Status:active» by design
 
 

Drupal is a registered trademark of Dries Buytaert.