
27/02/2008, 10:15
|
| | Fecha de Ingreso: febrero-2008
Mensajes: 26
Antigüedad: 17 años, 2 meses Puntos: 1 | |
aqui tienen un codigo para sacar los findesemanas de un determinado año ojala les sirva este pequeño y sencillo codigo, y si lo pueden optimizar mejor aun
aqui esta ojala les sirva.
<%
'Primero tomamos el instante y lo guardamos en la variable tiempo.
dim i,m,j
for m=1 to 12
if m=2 and year(now)mod 4 =0 then
j= 29
else if m=2 and year(now)mod 4 <>0 then
j=28
else if m=1 or m=5 or m=7 or m=8 or m=11 or m=12 then
j=31
else if m=3 or m=4 or m=6 or m=9 or m=10 then
j=30
end if
end if
end if
end if
for i=1 to j
fecha= cstr(year(now))+"/"+cstr(m)+"/"+cstr(i)
if isdate(fecha) then
if WeekDay(fecha)=7 then
response.Write(fecha& "<BR>")
end if
if WeekDay(fecha)=1 then
response.Write(fecha & "<BR>")
end if
end if
next
next
%> |