8

The unit SysUtils (System.SysUtils) no longer has an EraNames or FormatSettings.EraNames. What is its replacement and where did it go?

i.e:

 for I := Low(SysUtils.EraNames) to High(SysUtils.EraNames) do
    begin
      ..
    end;
Warren P
  • 65,725
  • 40
  • 181
  • 316

1 Answers1

11

I'm answering my own question because I thought this might help someone.

Use FormatSettings.EraInfo[x].EraName and other properties of the EraInfo record.

The FormatSettings now holds an Array of EraInfo Records.

The for loop could be written:

   for I := Low(FormatSettings.EraInfo) to High(FormatSettings.EraInfo) do
   begin
     ...
   end;
Warren P
  • 65,725
  • 40
  • 181
  • 316