View Single Post
Old 12-05-2012, 08:45 AM   PM User | #4
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,530
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by Philip M View Post
Code:
var d = parseInt(days)
The JavaScript function for getting the integer portion of a number is Math.floor() so that statement should read:

Code:
var d = Math.floor(days);
parseInt is for converting numbers between bases - eg binary to decimal, hexadecimal to decimal or even base 36 to decimal.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote