Add commas to Calculate difference btw the two dates script
Hello everyone
I have a script on my personal home page that counts the days between 10/19/1962 and Today. It works fine but I would like the output to have thousands commas. Can someone help? I would need to be able to copy and paste your help as I am not a programmer. Here is the script:
Code:
<script type="text/javascript">
//Set the two dates
var millennium =new Date(1962, 9, 19) //Month is 0-11 in JavaScript
today=new Date()
//Get 1 day in milliseconds
var one_day=1000*60*60*24
//Calculate difference btw the two dates, and convert to days
document.write(Math.ceil((today.getTime()-millennium.getTime())/(one_day))+
" days")
</script>
Thanks for any help
JustDave