Bugs in TdwsFormatSettings.TryStrToDateTime unit dwsDateTime

Issue #107 resolved
Ashley created an issue
  1. Any reference to a long or short day or month name results in a range check exception because all the for loops start at index 0 whilst the arrays start at index 1

  2. The loop for longMonthNames incorrectly references LongDayNames:

           for j:=**0** (should be 1!) to High(settings.LongMonthNames) do begin
              if UnicodeSameText(Copy(fmt, p, Length(settings.**LongDayNames**[j])),
                                 settings.**LongDayNames**[j]) then begin
                 Inc(p, Length(settings.**LongDayNames**[j]));
    

Comments (1)

  1. Log in to comment