Just sharing this Java script I found at http://www.javascriptkit.com that can be used on your web page to count your number of days SI-free.
Code: Select all
<script>
/*
Count up from any date script-
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" days"
document.write("I am "+difference+" self-injury free!")
}
//enter the count up date using the format year/month/day
countup(2003,07,15)
</script>
Maybe lots of techie people out there will have better ideas - I know nothing about java, well except this sort -->
Laura