Add an Event method for returning a non-inclusive end DataTime object.

Have Calendar use that for determining the end of a week in viewWeek.
Fix getEventsIn to do all comparisons in UTC so that extra events are not added in.
This commit is contained in:
Colin Kuskie 2009-07-03 05:04:43 +00:00
parent f04a162ea3
commit 1bcae0d3bc
4 changed files with 213 additions and 37 deletions

View file

@ -19,7 +19,7 @@ use WebGUI::Asset::Event;
use Test::More; # increment this value for each test you create
use Test::Deep;
plan tests => 9;
plan tests => 10;
my $session = WebGUI::Test->session;
@ -81,3 +81,5 @@ is($event3->isAllDay, 1, 'isAllDay is zero since it has no start or end time, ev
%templateVars = $event3->getTemplateVars();
is($templateVars{dateSpan}, 'Wednesday, August 16 • Thursday, August 17 ', 'getTemplateVars: dateSpan with no times, across two days');
is($templateVars{isOneDay}, 0, 'getTemplateVars: isOneDay with different start and end dates');
cmp_ok($event3->getDateTimeEnd, '>', $event3->getDateTimeEndNI, 'getDateTimeEndNI is less than getDateTimeEnd');