Ver Mensaje Individual
  #20  
Antiguo 02-08-2007
luisgutierrezb luisgutierrezb is offline
Miembro
 
Registrado: oct 2005
Ubicación: México
Posts: 925
Reputación: 19
luisgutierrezb Va por buen camino
a lo mejor es un poco tarde, pero se me ocurrio esto para lo inverso:

Código Delphi [-]
// basado en el codigo de Delphius

function LetraAAnio(Letra: Char): Integer;
const
  LETRAS = 'KLMNPRSTVXZABCDEFHJ';
var 
  i,j: integer; 
begin
  i := Pos(AnioALetra(Year(Now)), Letras);
  j := Pos(Letra, Letras);
  if i <= j then
    Result := Year(Now) + (j-i)
  else
    Result := Year(Now) - (i-j)
end;
Responder Con Cita