Dá uma olhada se este exemplo funciona: function TForm1.AnoBiSexto(Ayear: Integer): Boolean; begin // Verifica se o ano é Bi-Sexto Result := (AYear mod 4 = 0) and ((AYear mod 100 <> 0) or (AYear mod 400 = 0)); end; function TForm1.DiasPorMes(Ayear, AMonth: Integer): Integer; const DaysInMonth: array[1..12] of Integer = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); begin Result := DaysInMonth[AMonth]; if (AMonth = 2) and AnoBiSexto(AYear) then Inc(Result); end; procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption := IntToStr(DiasPorMes(1999, 10)); end;
----- Original Message ----- From: Red Mosquito To: [EMAIL PROTECTED] ; delphi-br@yahoogrupos.com.br Sent: Thursday, September 27, 2007 3:47 PM Subject: [delphi-br] DIAS DO MÊS Existe alguma função do próprio Delphi que retorna QUANTOS DIAS HÁ NO MÊS ? Se negativo, alguém possui alguma função que faça isso ? Obrigado Junior [As partes desta mensagem que não continham texto foram removidas] ------------------------------------------------------------------------------ No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.13.32/1032 - Release Date: 26/9/2007 20:20 [As partes desta mensagem que não continham texto foram removidas]