I'm trying to display the difference between the 1st of October 2013 and today.
According to Microsoft's calculator date difference tool it is 274 days.
But with my current javascript code, I get a result of 244 days.
My current code:
<script type="text/javascript">
var pregnant = new Date(2013, 10, 1)
today=new Date()
var one_day=1000*60*60*24
var difference = Math.ceil((today.getTime()-pregnant.getTime())/(one_day));
document.write("It has been " + difference + " days since Jackie has been pregnant!")
</script>
Also I need some help with placing the content in a specific div rather than just throwing it in the html somewhere.
`
– adeneo Jul 02 '14 at 15:40