Date.prototype.addMilliseconds(milliseconds)

Description:

Add specified milliseconds to the date value.

Parameters:

  • milliseconds
    • 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.addMilliseconds(1000);
document.write(date.format("yyyy-MM-dd HH:mm:ss"));
//Result: "2012-05-02 18:01:04"

Last edited Aug 20, 2012 at 6:44 AM by rynnwang, version 3

Comments

No comments yet.