Guest User

Untitled

a guest
Jun 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <b>
  2.  
  3. <script>
  4. var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
  5.  
  6. function countup(d,m,yr){
  7. var today=new Date()
  8. var todayy=today.getYear()
  9. if (todayy < 1000)
  10. todayy+=1900
  11. var todaym=today.getMonth()
  12. var todayd=today.getDate()
  13. var todaystring=montharray[todaym]+" "+todayd+", "+todayy
  14. var paststring=montharray[m-1]+" "+d+", "+yr
  15. var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
  16. difference+=" days"
  17. //document.write("Mira is "+difference)
  18. var result="Mira is "+difference
  19. return result
  20. }
  21. function show2(){
  22. if (!document.all&&!document.getElementById)
  23. return
  24. thelement=document.getElementById? document.getElementById("tick2"): document.all.tick2
  25. var Digital=new Date()
  26. var hours=Digital.getHours()
  27. var minutes=Digital.getMinutes()
  28. var seconds=Digital.getSeconds()
  29. if (hours<=9)
  30. hours="0"+hours
  31. if (minutes<=9)
  32. minutes="0"+minutes
  33. if (seconds<=9)
  34. seconds="0"+seconds
  35. var ctime=hours+" hours "+minutes+" minutes and "+seconds+" seconds overdue."
  36. thelement.innerHTML=ctime
  37. setTimeout("show2()",1000)
  38. }
  39. window.onload=show2
  40. document.write(countup(28,10,2011))
  41. </script>
  42. <span id=tick2>
  43. </span>
Add Comment
Please, Sign In to add comment