Ver Mensaje Individual
  #1  
Antiguo 31-03-2016
darkamerico darkamerico is online now
Miembro
 
Registrado: dic 2010
Posts: 246
Reputación: 14
darkamerico Va por buen camino
Error de la funcion ShortMonthNames() en XE10

Saludos amigos, tengo la clase siguiente:

Código Delphi [-]
uses System.SysUtils, VCL.Dialogs, System.DateUtils;

type
  TDate = class
    mes, dia, anio: integer;

    procedure setFecha(m, d, a: Integer);
    function getFecha():string; overload;
    function getFecha(formato:char):string; overload;
    function esBisiesto():boolean;
    function queDiaEs():string;
  end;

...

function TDate.getFecha:string;
begin
  getFecha:=IntToStr(dia)+'/'+IntToStr(mes)+'/'+IntToStr(anio);
end;

function TDate.getFecha(formato:char):string;
begin
  getFecha:='Hoy es ' + queDiaEs + ', ' + IntToStr(dia) +
            ' de ' + ShortMonthNames[mes] +
            ' del ' + IntToStr(anio);
end;

...

begin
  try
    fecha:=TDate.Create();
    fecha.setFecha(3,30,2016);
    ShowMessage('Fecha Ingresada:' + fecha.getFecha());
    ShowMessage(fecha.queDiaEs);
  finally
    fecha.Free;
  end;
end.

El error aparece en la linea ShortMonthNames[mes], dice E2003 Undeclared identifier: 'ShortMonthNames'
Pero según la bibliografia esa función esta dentro de System.SysUtils...


Ayuda pleaseee


Americo
Responder Con Cita