I need something that will display a date that is 30 days ago from today as well as another date that is 60 days ago. Including weekends.
I have been searching everywhere and cant find something like this. Anyone know code for it?
I need something that will display a date that is 30 days ago from today as well as another date that is 60 days ago. Including weekends.
I have been searching everywhere and cant find something like this. Anyone know code for it?
Sure, try something like the below script:
Code:<script type="text/javascript"> function displaybackday(offset){ var pastdate=new Date() pastdate.setDate(new Date().getDate()+offset) document.write('<p>'+pastdate.toLocaleString()+'</p>') } displaybackday(-30) //display date/ time -30 days from today displaybackday(-60) //display date/ time -30 days from today </script>
Bookmarks