Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros temas > Trucos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Los mejores trucos

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 25-02-2008
Avatar de maximo_nashir
maximo_nashir maximo_nashir is offline
Miembro
 
Registrado: ene 2004
Ubicación: República dominicana
Posts: 55
Poder: 21
maximo_nashir Va por buen camino
//Para el que lo quiera hacer con las versiones anteriores
//a Delphi 7, aquí les va el codigillo:

function DiasDeUnMes(const wYear, wMonth: Word): Word;
begin
Result := MonthDays[(wMonth = 2) and IsLeapYear(wYear), wMonth];
end;

function DiasEnMes(const dFecha: TDateTime): Word;
var
wYear, wMonth, wDay: Word;
begin
DecodeDate(dFecha, wYear, wMonth, wDay);
Result := DiasDeUnMes(wYear, wMonth);
end;
//Y PARA QUE SE EJECUTE LA FUNCION QUE SE CREÓ PONDRAN ESTE CODIGO:
DiasEnMes(DateEdit1.Date);
//Y ENTONCES ESTA FUNCIÓN TE LANZARÁ LOS DIAS QUE
//CONTIENE CUALQUIER MES, SEA EL AÑO VICIESTO O NO, ESPERO LES SIRVA
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 00:19:55.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi