From 73d85203d574d984fa96ac8dc31cd84e3441f1d8 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 16 Jul 2007 18:10:24 +0000 Subject: [PATCH] fix: Calendar events on the last day of the month do not appear on the month view --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Asset/Wobject/Calendar.pm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index cd6693dca..3cfef096d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -74,6 +74,8 @@ 7.3.21 - fix: Self-deactivation doesn't show login screen after success + - fix regression: Calendar events on the last day of the month do not appear on the month view + http://www.webgui.org/bugs/tracker/fixed-calendar-events-on-the-last-day-of-the-month-do-not-appear-on-the-month-view 7.3.20 - Added beta label to the beta components in the system, so people can more diff --git a/lib/WebGUI/Asset/Wobject/Calendar.pm b/lib/WebGUI/Asset/Wobject/Calendar.pm index 9b9644375..6bb9209b1 100644 --- a/lib/WebGUI/Asset/Wobject/Calendar.pm +++ b/lib/WebGUI/Asset/Wobject/Calendar.pm @@ -1121,8 +1121,9 @@ sub viewMonth { my $dt = WebGUI::DateTime->new($self->session, $params->{start}); $dt->truncate( to => "month"); my $start = $dt->toMysql; - my $dtEnd = $dt->clone->add(months => 1)->add(seconds => -1); + my $dtEnd = $dt->clone->add(months => 1); my $end = $dtEnd->toMysql; + $dtEnd->add(seconds => -1); my @events = $self->getEventsIn($start,$end);