|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
uses
System.Globalization;
var
britCulture : System.Globalization.CultureInfo;
britCal : System.Globalization.Calendar;
dateTimeFormat : System.Globalization.DateTimeFormatInfo;
era : Integer;
eras : Array of Integer;
begin // Set up British culture and calendar
britCulture := CultureInfo.Create('en-GB');
britCal := britCulture.Calendar;
// Display the British Eras :
eras := britCal.Eras;
dateTimeFormat := britCulture.DateTimeFormat;
for era := 0 to Length(eras)-1 do
Console.WriteLine('British Era {0} = {1}',
eras[era].ToString,
dateTimeFormat.GetAbbreviatedEraName(eras[era]));
Console.ReadLine;
end.
|
British Era 1 = AD
|
|