Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/06/2015, 10:20
yole
 
Fecha de Ingreso: julio-2007
Mensajes: 287
Antigüedad: 16 años, 9 meses
Puntos: 4
Respuesta: calcular fecha según cantidad de horas asignadas

Ya esta resuelto.
Dejo acá la respuesta por si le sirve a alguien.

Hago la salvedad de que:
Entre la opción Urgente y 12hr horas es lo mismo jejejeje. En ambos casos muestra la fecha actual.

Código PHP:
Ver original
  1. switch ($_POST['ta']) {
  2.     case 'urgente':
  3.         $fechaHoy ="Urgente.<br/> Fecha de entrega: ".date('Y-m-d');
  4.         echo $fechaHoy;
  5.         break;
  6.        
  7.     case '12h':
  8.         $fechaEntrega = "12Hr.<br/> Fecha de entrega: ".date('Y-m-d', (strtotime ("+12 Hours")));
  9.         echo $fechaEntrega;
  10.         break;
  11.        
  12.     case '24h':
  13.         $fechaEntrega = "14Hr.<br/> Fecha de entrega: ".date('Y-m-d', (strtotime ("+24 Hours")));
  14.         echo $fechaEntrega;
  15.         break;
  16.        
  17.     case '48h':
  18.         $fechaEntrega = "48Hr.<br/> Fecha de entrega: ".date('Y-m-d', (strtotime ("+48 Hours")));
  19.         echo $fechaEntrega;
  20.         break;
  21.        
  22.     case 'a fecha':
  23.         echo "a fecha: <br/>";
  24.         echo $_POST['de']."<br/>";
  25.         echo $_POST['me']."<br/>";
  26.         break;
  27. }