From 739dc52c6ef9cd1ac96bed54457590d4e60455f2 Mon Sep 17 00:00:00 2001 From: unclecheese Date: Wed, 31 Oct 2012 11:53:50 -0300 Subject: [PATCH] BUGFIX: Final day of month was incorrect on months with 31 days. --- code/Calendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/Calendar.php b/code/Calendar.php index d67a97d..b8eebc5 100755 --- a/code/Calendar.php +++ b/code/Calendar.php @@ -501,9 +501,9 @@ public function setWeekendView() { public function setMonthView() { - $this->view = "month"; + $this->view = "month"; $this->startDate = sfDate::getInstance()->firstDayOfMonth(); - $this->endDate = sfDate::getInstance()->finalDayOfMonth(); + $this->endDate = sfDate::getInstance($this->startDate)->finalDayOfMonth(); }