Ver Mensaje Individual
  #6 (permalink)  
Antiguo 06/01/2012, 18:02
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Pasar una fecha de PHP a objeto Date de Javascript

Cita:
var fecha = '<?php echo date("Y-m-d")?>';
fecha = fecha.replace(/-/g,',');
var myDate=new Date(fecha);
myDate.setDate(myDate.getDate()+5);
alert(myDate);
a partir de aquí es sencillo. has de parsear la fecha con los método getDate(), getMonth() y getFullYear()
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}