Posted By

3v1l1v3 on 10/18/12


Tagged

javascript


Versions (?)

Days in Month


 / Published in: JavaScript
 

returns the number of days in the month of a Date

  1. Date.prototype.getDaysInMonth = function() {
  2. return new Date( this.getFullYear(), this.getMonth() + 1, 0).getDate();
  3. }

Report this snippet  

You need to login to post a comment.