Countdown Timer – The strongest of all warriors – Its Time, Relations

Yesterday i had developed one Timer counter, it is funny and after that i felt below..

The strongest of all warriors are — Time, Patience, Experience, Relation – LEO TOLSTOY

Surely , no one can stop Time. We have to walk along with it, by making history – because its ours….

Evey one fight/compitate with surroundings and loose every thing, but forgets to fight/compitate with self and with TIME! its funny.

With Patience one has to catch Time.

Future lies in Past. I found that experience is the most valuable thing. I think the things developing, predicting by the people are repetitive structures of ages based on one principle.

With out True and Pure Relations there is no meaning to above sentences….

Countdown Timer Code:

<div id=”timelable”></div>

<script type=”text/javascript”>

var leave =<%=seconds%>;

CounterTimer();

var interv=setInterval(CounterTimer,1000);

function CounterTimer()

{

var day = Math.floor(leave / ( 60 * 60 * 24))

var hour = Math.floor(leave / 3600) – (day * 24)

var minute = Math.floor(leave / 60) – (day * 24 *60) – (hour * 60)

var second = Math.floor(leave) – (day * 24 *60*60) – (hour * 60 * 60) – (minute*60)

hour=hour<10 ? “0” + hour : hour;

minute=minute<10 ? “0” + minute : minute;

second=second<10 ? “0” + second : second;

var remain=day + ” days : “+ hour + ” Hrs : “+ minute +” Min : “+ second +” Sec”;

leave=leave-1;

document.getElementById(“timelabel”).innerText=remain;

}

</script>

using System;

using System.Data;

public partial class Ticker_Timer : System.Web.UI.UserControl

{

public double seconds;

protected void Page_Load(object sender, EventArgs e)

{

seconds = (GetEndTime() – GetStartTime()).TotalSeconds;

}

private DateTime GetStartTime()

{

return DateTime.Now;

}

private DateTime GetEndTime()

{

return new DateTime(2012, 5, 31, 23, 59, 59);

}

}

Advertisements

One thought on “Countdown Timer – The strongest of all warriors – Its Time, Relations

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s