From 5bd56fc9356a5ef3b0bd9d306e7c2bc1f877915e Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 4 Nov 2013 17:01:59 -0500 Subject: [PATCH] fix days in month --- javascripts/month.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/javascripts/month.js b/javascripts/month.js index 59cb6b9..2abf16a 100644 --- a/javascripts/month.js +++ b/javascripts/month.js @@ -49,9 +49,7 @@ $(function(){ } this.name = this._names.en[ this.month ]; this.daysInMonth = (function(){ - month = (self.month + 1) % 11; - year = self.month === 11 ? self.year + 1 : self.year; - return ( new Date( year, month, 0 ) ).getDate(); + return ( new Date( self.year, self.month + 1, 0 ) ).getDate(); })(); this.dateObject = new Date( this.year, this.month, 1 ); this.render();