Kod:
function ayin_son_gunu(gelen_tarih:tdate): integer; var yil, ay, gun: word; //bu fonksiyon gonderilen tarihe 1 ay ekleyip, sonra 1 gun eksilterek, gelen tarihin son gununu bulur. begin decodedate(gelen_tarih, yil, ay, gun); ay := ay + 1; if ay > 12 then begin yil:= yil + 1; ay := 1; end; result:=strtoint(copy(datetostr(encodedate(yil, ay, 1) - 1),1,2)); end;

__________________