RecurrencyHandler and occurances

It seems to me that using a TRecurrencyHandler to generate the list of dates for a recurring event does not take into account the RepeatCount when generating the dates. For example, an event repeating every day for 5 days, should have an end date 5 days in the future not "infinite".

I cannot reproduce a problem.
Was retested with the code:


  rh := TRecurrencyHandler.Create;
  rh.StartTime := Now;
  rh.EndTime := Now + EncodeTime(2,0,0,0);
  rh.Frequency := rfDaily;
  rh.RepeatCount := 5;
  rh.Compose;
  rh.Recurrency := rh.Compose;
  rh.Generate;

and this generates a series of 5 events.

Right you are. I was not setting the EndTime properly. Now it seems to work just fine.