Portal    Foro    Buscar    FAQ    Registrarse    Conectarse


JanuWeb.Com  Informa

JanuWeb es una Comunidad abierta a todos los internautas.
Pero algunos de sus contenidos (Adjuntos, Descargas, Grupos...) sólo son accesibles a usuarios registrados.

Regístrate y disfruta al completo de la web.



Publicar Nuevo Tema  El tema está bloqueado: no pueden editarse ni agregar mensajes. Página 1 de 1
 
Averiguar Día De Nacimiento De Una Persona
Autor Mensaje
Responder Citando
Mensaje Averiguar Día De Nacimiento De Una Persona 
 
Si quieres ofrecer a tus visitantes la posibilidad de poder consultar que día de la semana fue una determinada fecha este es el código javascript que necesitas.


<!-- Colocar en la etiqueta <HEAD> -->

<SCRIPT LANGUAGE="JavaScript">

<!-- Adaptado al español por http://music-mx.iespana.es/index.php/ -->

<!-- Begin
function calculate() {
month = document.form.month.selectedIndex;
month = document.form.month.options[month].value;
day = document.form.day.selectedIndex;
day = document.form.day.options[day].value;
year = document.form.year.value;

var oyear=year

var dob = " "+ year +", "+month + ",  "+day;
var thenx = new Date(dob);

var year=thenx.getYear();
if (year<100) year="19" + thenx.getYear();
else year=thenx.getYear();

if (year > 1969) wyear=year;
else {
if (oyear<1900) {
if (oyear>1800) {
wrelyear= (eval(oyear)-1801)%(28);
wyear = wrelyear+1981;
}
else wyear = 1970
}
else
if (oyear>1900) {wrelyear= (eval(oyear)-1901)%(28);
wyear= wrelyear+1985
}
else
if (oyear==1900) {wyear= 1990;
   }              
}
var dob = " "+ wyear +", "+month + ",  "+day;
var thenx = new Date(dob);

var theday = thenx.getDay()+1;
var date=thenx.getDate();

var weekday = new Array(6);
weekday[1]="Domingo";
weekday[2]="Lunes";
weekday[3]="Martes";
weekday[4]="Miércoles";
weekday[5]="Jueves";
weekday[6]="Viernes";
weekday[7]="Sábado";
if (day != date) alert("Sorry!  That appears to be an invalid date!"+day+" ..."+date+"::"+oyear+"..."+year+" "+dob+"=="+wyear+".-.-"+thenx+" "+day+" "+month);
else {
dayborn = weekday[theday];
dob = dayborn;
alert("Tu naciste un " + dob);
   }
}
// End -->
</script>


<!-- Colocar en la etiqueta <BODY> -->

<form name=form>
<center>
<table border=2 cellspacing=0 cellpadding=0 bgcolor=white>
<tr><td colspan=3 align=center bgcolor="#FFFFCC">
    <p style="margin-top: 0; margin-bottom: 0"><font face="verdana, arial" size="-1"><b>¿En que día
    de las semana naciste?</b></font></p>
    <p style="margin-top: 0; margin-bottom: 0"><font face="verdana, arial" size="-1">Introduce
    tu fecha de nacimiento</font></p>
  </td></tr>
<tr><td align=center bgcolor="#FFFFCC">
<select name="month" size="1">
<option selected>Mes
<option value="January">Enero
<option value="February">Febrero
<option value="March">Marzo
<option value="April">Abril
<option value="May">Mayo
<option value="June">Junio
<option value="July">Julio
<option value="August">Agosto
<option value="September">Septiembre
<option value="October">Octubre
<option value="November">Noviembre
<option value="December">Diciembre
</select>
</td>
<td align=center bgcolor="#FFFFCC">
<select name="day" size="1">
<option selected>Día
<option value="1">01
<option value="2">02
<option value="3">03
<option value="4">04
<option value="5">05
<option value="6">06
<option value="7">07
<option value="8">08
<option value="9">09
<option value="10">10
<option value="11">11
<option value="12">12
<option value="13">13
<option value="14">14
<option value="15">15
<option value="16">16
<option value="17">17
<option value="18">18
<option value="19">19
<option value="20">20
<option value="21">21
<option value="22">22
<option value="23">23
<option value="24">24
<option value="25">25
<option value="26">26
<option value="27">27
<option value="28">28
<option value="29">29
<option value="30">30
<option value="31">31
</select>
</td>
<td align=center bgcolor="#FFFFCC">
<input type=text name=year value="19" size=4 maxlength=4>
</td></tr>
</table><p>
<input type=button value="Calcular" onClick="calculate()">
</center>
</form>

<p align="center"><center>
<font face="arial, helvetica" size="-2">JavaScript adaptado por</font></center>

<p align="center" style="margin-top: 0"><font face="arial, helvetica" size="-2"><a href="http://music-mx.iespana.es/">...::
Music-mx.iespana.es ::..</a></font><p>





Desconectado Ver perfil del usuario Enviar Mensaje Privado Ver la Galería Personal del usuario
Descargar Mensaje Volver arriba Página Inferior
Gracias por el tema tan útil, gcarsan2005:
zankyw (16 Septiembre) 
Mostrar mensajes anteriores:   
Ocultar¿Este tema fue útil?
Compartir este tema
blinkslist.com blogmarks.net co.mments.com del.icio.us digg.com newsvine.com facebook.com fark.com feedmelinks.com furl.net google.com linkagogo.com ma.gnolia.com meneame.net netscape.com reddit.com shadows.com simpy.com slashdot.org smarking.com spurl.net stumbleupon.com technorati.com favorites.live.com yahoo.com DIGG ITA Fai Informazione KiPapa Ok Notizie Segnalo
OcultarTemas Parecidos
Tema Autor Foro Respuestas Último Mensaje
No hay nuevos mensajes Averiguar IP De Clics Hazard Soporte Icy Phoenix 5 17 Oct 2007 17:35 Ver último mensaje
Aexo
No hay nuevos mensajes Averiguar Quien A Puesto Una Tarjeta Amarilla HaCknew Soporte Icy Phoenix 1 13 Aug 2008 19:44 Ver último mensaje
angelismo

Publicar Nuevo Tema  El tema está bloqueado: no pueden editarse ni agregar mensajes.  Página 1 de 1
 

Usuarios navegando en este Tema: 0 Registrados, 0 Ocultos y 1 Invitado
Usuarios Registrados conectados: Ninguno


 
Lista de Permisos
No puede crear mensajes
No puede responder temas
No puede editar sus mensajes
No puede borrar sus mensajes
No puede votar en encuestas
No puede adjuntar archivos
No Puede descargar archivos
Puede enviar eventos al Calendario



  



 

JanuWeb.Com  Destaca


JanuWeb.ComJanuWeb.OrgJanuBlog.Com están alojadas en Sotem.es • © 2006, 2008

MuchoGrafico - Paz y Justicia - phpBB-Es - Icy Phoenix España - Ciber Morph - Lphant - EDDB - CoMuNiDaD ThE KuKa
RYLNet - phpBBMODs.Es - ZonaManolo - Directorio phpBB-Es - ModMovil - AyudaPC - Mas Pi - Madelman