calendarui/editors/src/CalenEditorDataHandler.cpp
branchRCL_3
changeset 27 55d60436f00b
parent 0 f979ecb2b13e
child 67 1539a383d7b6
equal deleted inserted replaced
21:9711e452b5e9 27:55d60436f00b
   788     switch( Edited().RepeatType() )
   788     switch( Edited().RepeatType() )
   789         {
   789         {
   790         case ERepeatDaily:
   790         case ERepeatDaily:
   791         case ERepeatWorkdays:
   791         case ERepeatWorkdays:
   792             {
   792             {
   793             TTimeIntervalDays durDays = Edited().EndDateTime().DaysFrom( Edited().StartDateTime() );
   793             TTime startDate = Edited().StartDateTime();
       
   794             TTime endDate = Edited().EndDateTime();
       
   795             // In case AllDay event end at "12:00am" 24/06/2009. 
       
   796             // editor should display EndDate as 23/06/2009.
       
   797             if(Edited().IsAllDayEvent())
       
   798                 {
       
   799                 if( endDate > startDate )
       
   800                     {
       
   801                     endDate -= TTimeIntervalDays( 1 );
       
   802                     if( endDate < startDate )
       
   803                         {
       
   804                         endDate = startDate;
       
   805                         }
       
   806                     }
       
   807                 }
       
   808             TTimeIntervalDays durDays = endDate.DaysFrom( startDate);
   794             isError = durDays >= TTimeIntervalDays(1);
   809             isError = durDays >= TTimeIntervalDays(1);
   795             break;
   810             break;
   796             }
   811             }
   797         case ERepeatWeekly:
   812         case ERepeatWeekly:
   798             {
   813             {