Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
Date.prototype.setMinutes() Method in Date Class of Javascript Syntax with Examples
1827 Views
Usage 
The setMinutes() Method is used to sets the mins for mentioned date based on local time.
Syntax 
dateObj.setMinutes(minutesValue)
Example
var today = new Date();
document.write("Today: "+today);
document.write("<br />");

today.setMinutes(today.getMinutes() - 1);
document.write("1 minute Before: "+today);
Output 
Today: Sat Nov 29 2014 13:02:10 GMT+0530 (India Standard Time)
1 minute Before: Sat Nov 29 2014 13:01:10 GMT+0530 (India Standard Time)
Best Lessons of "Javascript Syntax with Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details