TRecurrencyHandler.Generate oddness

 Hello,

I'm working with TRecurrencyHandler directly and am seeing some odd behavior.  For example, if I have this bit of code:

rh.Recurrency:=RecurrencyRule;
rh.StartTime:=StartTimePicker.DateTime;
rh.EndTime:=EndTimePicker.DateTime;
rh.Parse;
rh.Generate;
for i := 0 to rh.Dates.Count-1 do
    begin
      AdvColumnGrid1.Cols[1].Append(DateTimeToStr(rh.Dates.StartDate));
      AdvColumnGrid1.Cols[2].Append(DateTimeToStr(rh.Dates.EndDate));
   end;

If RecurrencyRule equals 'RRULE:FREQ=MONTHLY;COUNT=3',  I get 3 rows worth of events a month appart from each other as expected.  The oddness is that after the rh.Generate command, rh.Recurrency changes to 'RRULE:FREQ=MONTHLY;COUNT=3;BYDAY=MO,TU,WE,TH,FR,SA,SU' which creates some problems elsewhere.  Why would this happen?  This is with version 3.0.4.

Thanks!

I have retested this here with the code:


var
  rh: TRecurrencyHandler;
  i: integer;
begin
  rh := TRecurrencyHandler.Create;

  rh.Recurrency := 'RRULE:FREQ=MONTHLY;COUNT=3';

  rh.StartTime := EncodeDate(2016,12,1);
  rh.EndTime:=EncodeDate(2017,12,1);
  rh.Parse;
  rh.Generate;
  for i := 0 to rh.Dates.Count-1 do
  begin
    AdvStringGrid1.Cols[1].Append(DateTimeToStr(rh.Dates.StartDate));
    AdvStringGrid1.Cols[2].Append(DateTimeToStr(rh.Dates.EndDate));
  end;

  showmessage(rh.Recurrency);
  rh.Free;
end;

and I do not see rh.Recurrency change after the Generate command and I also do not see a reason for this to happen from the TRecurrencyHandler class it this class doesn't set internally the Recurrency property.