So for example, 10-02-2012, instead of 10-02-12 13:34:56 GMT.
Is there an easy solution out there for this?
I’m trying to make this dynamic, so that the resulting variable is always one week before the current date. Here’s what I’ve done to calculate the today variable, if this helps or can be used!
var currentTime = new Date(); var month = currentTime.getMonth() + 1 var day = currentTime.getDate(); var year = currentTime.getFullYear(); var today = month + "-" + day + "-" + year; alert(today)