Mega Code Archive

 
Categories / Delphi / Variables
 

Longmonthnames - an array of days of the month names, starting 1 = january

var LongMonthNames : array[1..12] of string; array[ 1] := 'January'; array[ 2] := 'February'; array[ 3] := 'March'; array[ 4] := 'April'; array[ 5] := 'May'; array[ 6] := 'June'; array[ 7] := 'July'; array[ 8] := 'August'; array[ 9] := 'September'; array[10] := 'October'; array[11] := 'November'; array[12] := 'December'; Description The LongMonthNames variable provides an array of full string names of the months of the year. Since it is an array, you can update the default values (set by the Windows locale), but this is not advised. Related commands LongDayNames An array of days of the week names, starting 1 = Sunday ShortDayNames An array of days of the week names, starting 1 = Sunday ShortMonthNames An array of days of the month names, starting 1 = Jan Example code : Show the month name of month 12 var month : string; begin month := LongMonthNames[12]; ShowMessage('Month 12 = '+month); end; Show full unit code Month 12 = December