/    Sign up×
Community /Pin to ProfileBookmark

on this site: [url]http://www.liquidlans.tk[/url] my site u see ‘v2.0 opens in 98 hours’

I need a code to let the page deduct 1 hour every hour so that its up 2 date…

can anyone help me with this?

[URL=http://www.liquidlans.tk]linkage :: [url]www.liquidlans.tk[/url][/URL]

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@MakkaeauthorNov 28.2002 — sorry for my noobness ?

var evtDate = new Date('11/28/2002 07:53:40 AM');

var curDate = new Date('11/28/2002 07:53:40 AM');

var milliseconds = evtDate.getTime() - curDate.getTime();

var seconds = milliseconds / 1000;

var minutes = seconds / 60;

var hours = minutes / 60;

alert(Math.floor(hours));

is this what is should be?

when i test the page it only displays a prompt window with 0 in it (duh because no hours have gone by ^_^) but what I meant was like this:

that this page: http://www.liquidlans.tk

in an hour would be this: http://home.wanadoo.nl/lalvanbal/index3.htm
Copy linkTweet thisAlerts:
@CharlesNov 28.2002 — [font=georgia]See http://developer.netscape.com/docs/manuals/js/client/jsref/date.htm for details for using the [font=monospace]Date()[/font] constructor. And note that you can use other date formats. The one that Mr. Clark is not necessarily universally recognized. [/font]
Copy linkTweet thisAlerts:
@CharlesNov 29.2002 — [font=georgia]There is a very real problem with the [font=monospace]mm/dd/yyyy[/font] format; it's not always possible to distinguish it from [font=monospace]dd/mm/yyyy[/font], another perfectly valid and common format. You're much better off using one of the standard date formats:

IETF: [font=monospace] Mon, 25 Dec 1995 13:30:00 GMT[/font]

ISO 8601: [font=monospace] 1994-11-05T08:15:30-05:00[/font]

ISO 8601 being the preferred format in HTML 4.01, you might want to use the later ( http://www.w3.org/TR/html4/types.html#type-datetime ) but the closest thing to a format that's guaranteed to work with the JavaScript [font=monospace]Date()[/font] constructor is the former. But if you want to be certain that your constructor will work (when JavaScript works) then use [font=monospace]Date(2002, 10, 29)[/font].[/font]
Copy linkTweet thisAlerts:
@MakkaeauthorNov 29.2002 — yea but now I still dont know exactly what code to use :p

can anyone one post the code with the html tags in it ^_^

and oh yea,, it's be nice if it were like this: HH:MM:SS ,,

sorry but i suck at javascript ?
Copy linkTweet thisAlerts:
@CharlesNov 29.2002 — [font=monospace]<script type="text/javascript">

<!--

now = new Date ();

then = new Date (2002, 10, 29, 10, 35);

// note: January is month 0

if (now <= then) {

ticsPerHour = 3600000;
ticsPerMinute = 60000;
ticsPerSecond = 1000;

ticsAway = then - now;
hoursAway = Math.floor(ticsAway/ticsPerHour);
remainder = ticsAway % ticsPerHour;
minutesAway = Math.floor(remainder/ticsPerMinute);
remainder = remainder % ticsPerMinute;
secondsAway = Math.floor(remainder/ticsPerSecond);

if (hoursAway < 10) hoursAway = '0' + hoursAway;
if (minutesAway < 10) minutesAway = '0' + minutesAway;
if (secondsAway < 10) secondsAway = '0' + secondsAway;

document.write ('<p>[::] v2.0 OPENS IN ', [hoursAway, minutesAway, secondsAway].join(':'), ' [::]</p>');

};

// -->

</script>

<noscript><p>v2.0 OPENS 29 NOVEMBER 2002 at 10:35 <acronym title="ante meridiem" lang="la">am</acronym> <acronym title="Eastern Standard Time">EST</acronym>.</p></noscript>

[/font]
×

Success!

Help @Makkae spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...