Trying to calculate the number of days between 08/28/2011 and the current date. For some reason, the document.write line isn't doing anything.
<script type="text/javascript">
var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds
var firstDate = new Date(2011,08,28);
var secondDate = new Date(year,month,day);
var diffDays = Math.round(Math.abs((firstDate.getTime() - secondDate.getTime())/(oneDay)));
document.write(diffdays);
</script>