Ringside
10-01-2005, 04:26 PM
I have searched high and low and the best I can find is this script that reveals the days until the end of the year. I have attempted mods to this script to revert the object to show it subtracted from 365 which gives a negative solution which is correct then getting the inverse to an absolute doesn't work.
Help script a day of the year. Many thanks.
<script>
today=new Date()
var endofyear=new Date(today.getFullYear(), 11, 31)
var one_day=1000*60*60*24
document.write(""+Math.ceil((endofyear.getTime()-today.getTime())/(one_day)-365)+" days remaining this year!")
</script>
Help script a day of the year. Many thanks.
<script>
today=new Date()
var endofyear=new Date(today.getFullYear(), 11, 31)
var one_day=1000*60*60*24
document.write(""+Math.ceil((endofyear.getTime()-today.getTime())/(one_day)-365)+" days remaining this year!")
</script>