JSFiddle - React, Tailwind, and code Playground

by ethertank

HTML

<a href="http://qiita.com/items/6297a117b4c5bc736695" title="今月の最終日を取得する #JavaScript - Qiita">今月の最終日を取得する #JavaScript - Qiita</a>

JavaScript

Date.prototype.getlastdayOfThisDate = function(){
    this.setMonth(this.getMonth()+1);
    this.setDate(0);
    return this.getDate();
};


var date = new Date(2013,1);
alert( date.getlastdayOfThisDate() );