Riding The Breeze

Jump to content

Additional information

Categories


Add days to a date in javascript

May 2007
30

shiftDay = 10
var myDate = new Date();
myDate.setDate(myDate.getUTCDate() + shiftDay)
day   = myDate.getUTCDate()
month = myDate.getUTCMonth()*1 + 1
year  = myDate.getUTCFullYear()

This code is quite easy:


Your Comment

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>




Credits

Template designed by praegnanz.de.