Forum Moderators: open
I will paste the html code I have below if it don't show you can see what it looks like on a page I have here:
<snipped>
A working list of dates where you can see expired dates is here:
<snipped>
This is why I am looking for a way to either add to this script or a way to auto update the age of the person and the year after the date passes.
Heres the pasted script:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Countdown Dates</title>
<style type="text/css">
<!--
body {
background-color: #003366;
}
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
font-weight: bold;
color: #000000;
}
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 25px;
font-weight: bold;
}
.style3 {
font-family: Tahoma;
font-size: 18px;
font-weight: bold;
}
.style4 {color: #FF0000}
.style11 {font-family: Tahoma; font-size: 14px; font-weight: bold; }
.style12 {
font-family: Tahoma;
font-size: 14px;
}
.style13 {
font-family: Tahoma;
font-size: 12px;
}
-->
</style>
</head>
<body style="background-color: #606060">
<div align="center">
<table width="700" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#606060">
<tr>
<td bordercolor="#FFFFFF" bgcolor="#808080"><div align="center">
<blockquote><script language="JavaScript">
<!--
var finalDate = "June 25, 2009 11:59 PM EST";
var end = new Date(finalDate);
var endOffset = end.getTime() / 100;
window.onload = function() {
calcTime();
setInterval("calcTime()", 100);
}
function calcTime() {
var now = new Date();
var startOffset = now.getTime() / 100;
var length = Math.floor(endOffset - startOffset);
days = Math.floor(length / 864000);
length = length % 864000;
hours = Math.floor(length / 36000);
length = length % 36000;
minutes = Math.floor(length / 600);
length = length % 600;
seconds = length / 10;
// Add trailing zero for seconds, i.e. 5 becomes 5.0
if (length % 10 == 0) seconds += ".0";
// If the deadline has been passed, set everything to zero
if (endOffset < startOffset) {
days = hours = minutes = seconds = 0;
}
var finalString = days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + "";
getObject("countDown").innerHTML = finalString;
}
function getObject(name) {
var ns4 = (document.layers) ? true : false;
var w3c = (document.getElementById) ? true : false;
var ie4 = (document.all) ? true : false;
if (ns4) return eval('document.' + name);
if (w3c) return document.getElementById(name);
if (ie4) return eval('document.all.' + name);
return false;
}
// -->
</script>
<!--CONTENT-->
<!--TITLE-->
<p><span class="style1">Ron---Age 52---June 26 2009 </span>
<!--END TITLE-->
</p>
<div class="style1" id="countDown" name="countDown">
</blockquote>
<p><b><font face="Tahoma" size="5"></font></b></p>
<!--END CONTENT-->
<p class="style13"> </p>
</div></td>
</tr>
</table>
</div>
</body>
</html>
====================================
Basically I would just like to see 2009 change to 2010
and the age 52 turn to 53 after the June 26th date passes.
I totally appreciate any help as I can not seem to find anything like it anywhere on the net.
Maybe it isn't possible.
Ron
[edited by: ron351 at 10:49 am (utc) on May 10, 2009]
[edited by: whoisgregg at 8:49 pm (utc) on May 10, 2009]
[edit reason] Whoops, no URLs please. See TOS [webmasterworld.com] [/edit]
[edited by: whoisgregg at 8:49 pm (utc) on May 10, 2009]
[edit reason] Whoops, no URLs please. See TOS [webmasterworld.com] [/edit]
I also suspect that your current 'countdown' fails (for up to a year before Feb 29th of a leap year, and only after the previous birthday to the one occurring in the 365 days after Feb 29th in the leap year) before Feb 29th of a leap year, for any birthday in the leap year that is after Feb 28th, and before Feb 28th of the year following the leap year. The count will be one day out for those conditions.
No. I am saying that for a Birthday on March 1st, that on February 28th, it will say "1 day to go" every year, although in a leap year it should say "2 days to go".
I guess it also fails (for up to a year before Feb 29th of a leap year, and only after the previous birthday to the one occurring in the 365 days after Feb 29th in the leap year) before Feb 29th of a leap year, for any birthday in any leap year that is after Feb 28th, and is before Feb 28th of the year following the leap year.