Date.prototype.addDays(days)

Description:

Add specified days to the date value.

Parameters:

  • days
    • Type: Number

Returned Value:

  • Value calculated

Notice:

After calling this method, the original variable has been applied the value calculated.

Sample:

var date = new Date(2012, 4, 2, 18, 01, 03);
date.addDays(3);
document.write(date.format("yyyy-MM-dd HH:mm:ss"));
//Result: "2012-05-05 18:01:03"

Last edited Aug 20, 2012 at 6:41 AM by rynnwang, version 2

Comments

No comments yet.