View Single Post
Old 05-17-2004, 12:09 AM  
grannytgp
Confirmed User
 
Join Date: Aug 2002
Posts: 269
java-script help - Modifying dates

I'm looking for a way to display not only the current date in "Month Day" format, but also a way to display one day back, two days back, three days back, and so on..

So in the date format, today's date would be "May 17" And yesterday's date would be "May 16", and so on...

From browsing around some java-script sites on google I came across the code to display today's date in this format, but I can't figure out how to manipulate the code to subtract one day, two days, etc...

I have an example page up here: http://www.grannytgp.com/month-day.html

I'm not sure how much code the board will let me post with banned words -- don't want it all looking like "hahahahahaha", so I thought it would be best to throw up the example page

One thing I was also thinking on this code is that it can't "break" when the month changes. So let's say it's now "June 01" The previous day will still need to be displayed at "May 31"

Any help on this would be greatly apprecaited.
__________________
No sig = good sig
grannytgp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote