kaban4ik писал(а):
Посмотрел, аналога в KOL вроде не нашелА это (из Kol.pas) разве не оно
#pas
procedure IncMonths( var SystemTime : TSystemTime; MonthsNum : Integer );
{* Increases/decreases month number in TSystemTime record onto given
months count (can be negative). Correct result is not garantee if
day number is incorrect for newly obtained month. }
.............
//[procedure IncMonths]
procedure IncMonths( var SystemTime : TSystemTime; MonthsNum : Integer );
var M : Integer;
DateTime : TDateTime;
begin
M := SystemTime.wMonth + MonthsNum - 1;
Inc( SystemTime.wYear, M div 12 );
SystemTime.wMonth := M mod 12 + 1;
// Normalize wDayOfWeek field:
SystemTime2DateTime( SystemTime, DateTime );
DateTime2SystemTime( DateTime, SystemTime );
end;