JRS: In article <7b3721c8.0412030957.6c57706c (AT) posting (DOT) google.com>,
dated Fri, 3 Dec 2004 09:57:03, seen in news:comp.lang.javascript, Terry
Haufler <terryhaufler (AT) acplus (DOT) com> posted :
Quote:
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs; |
Better done with
closeTime = new Date().valueOf() / 1000 | 0
unless you do want rollback at midnight (add %86400), on plausible
assumptions about how you use it.
When posting code to News, do not allow your software to introduce line
breaks; it has the effect of making some of us not bother to read it.
Use two spaces, not a tab, as the indent unit.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.