Cita:
Empezado por roman
Y bueno, si les parecen muchas líneas, también podemos hacer así la función:
Código Delphi [-]
function LaboralAnterior(ADate: TDate): TDate;
begin
Result := IncDay(ADate, -1-2*Integer(DayOfTheWeek(ADate) = 1)-Integer(DayOfTheWeek(ADate) = 7));
end;
// Saludos
|
¿-1-2?
Lo tuyo ya es de presumido
Te voy a acusar con el profe porque nos estás haciendo quedar mal
Yo me quedo con el case, definir el decremento y calcular.
Saludos,