HighDots Forums  

Re: Cool count down timer sourcecode updated

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Cool count down timer sourcecode updated in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dr J R Stockton
 
Posts: n/a

Default Re: Cool count down timer sourcecode updated - 11-02-2006 , 04:22 PM






In message <1162434931.736820.150010 (AT) b28g2000cwb (DOT) googlegroups.com>, Wed,
1 Nov 2006 18:35:31, HeroinNO.4 (AT) gmail (DOT) com writes

There is a general rule that anything described as "cool" by its
anonymous author will be juvenile trash.

Quote:
var today = new Date();
var startday = new Date();
You don't seem to use those values, and new Date() is time-expensive.

Quote:
var secPerDay = 0;
var minPerDay = 0;
var hourPerDay = 0;
var secsLeft = 0;
var secsRound = 0;
var secsRemain = 0;
var minLeft = 0;
var minRound = 0;
var minRemain = 0;
var timeRemain = 0;
I doubt whether you use those values either.

Quote:
startday = new Date("November 06, 2006 00:00 GMT");
startday.setYear("2006");
It will already be 2006. setYear calls for a Number; why give it a
String?

Quote:
today = new Date();
secsPerDay = 1000 ;
An unreasonable value for an identifier called that. Likewise the next
two.

Quote:
minPerDay = 60 * 1000 ;
hoursPerDay = 60 * 60 * 1000;
PerDay = 24 * 60 * 60 * 1000;
It's not worth trying to read code with mis-named variables.


It's a good idea to read the newsgroup and its FAQ. See below.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.