Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
Date.prototype.getMonth() Method in Date Class of Javascript Syntax with Examples
1887 Views
Usage  
The getDate() method is used to return the month for mentioned date based on local time.(Zero indicates first month of the year).
Syntax  
dateObject.getMonth()
Example
var Newyear = new Date('January 1, 2015 00:00:00');
var Month = Newyear.getMonth();
document.write(Month);
Output  
0
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