0

Possible Duplicate:
Add days to DateTime using JavaScript

if today's date of 5-12-2012, I want to display the date the next day 6-12-2012. How is that coded in javascript?

Community
  • 1
  • 1
ramadani
  • 449
  • 2
  • 6
  • 25

1 Answers1

3
var date = "5-12-2012";
var datum = new Date(date);
datum.setDate(datum.getDate() + 1);
date = datum.getDate() + "-" + (datum.getMonth() + 1) + "-" + datum.getFullYear();
I29
  • 686
  • 4
  • 9