Formatos de fechas
This commit is contained in:
@@ -67,6 +67,9 @@ $hora = $hora_ini.":".$min_ini.":00";
|
||||
|
||||
switch($tipo){
|
||||
case 1://Reposición
|
||||
$fecha_nueva = $fecha;
|
||||
$fecha_clase = $fecha_falta;
|
||||
|
||||
$fecha_new = DateTime::createFromFormat('d/m/Y', $fecha)->format('Y-m-d')." ".$hora;
|
||||
$fecha_fin_new = date("Y-m-d", strtotime($fecha_new))." ".$duracion_tiempo;
|
||||
$dia_new = date('w', strtotime($fecha_new));
|
||||
@@ -82,27 +85,30 @@ switch($tipo){
|
||||
echo intval($dia)." != ".intval($dia_falta);*/
|
||||
exit();
|
||||
}
|
||||
$fecha_nueva = date('d/m/Y', strtotime($fecha_new));
|
||||
$fecha_clase = date('d/m/Y', strtotime($fecha_falta));
|
||||
|
||||
break;
|
||||
case 2://Cambio
|
||||
$fecha_nueva = $fecha_cambio;
|
||||
|
||||
$fecha_cambio = DateTime::createFromFormat('d/m/Y', $fecha_cambio)->format('Y-m-d');
|
||||
$dia_falta = date('w', strtotime($fecha_cambio));
|
||||
$fecha_nueva = date('d/m/Y', strtotime($fecha_cambio));
|
||||
break;
|
||||
case 3://Solicitud de espacio
|
||||
$fecha_nueva = $fecha;
|
||||
|
||||
$fecha_new = DateTime::createFromFormat('d/m/Y', $fecha)->format('Y-m-d')." ".$hora;
|
||||
$fecha_fin_new = date("Y-m-d", strtotime($fecha_new))." ".$duracion_tiempo;
|
||||
$dia_new = date('w', strtotime($fecha_new));
|
||||
$fecha_nueva = date('d/m/Y', strtotime($fecha_new));
|
||||
break;
|
||||
case 4://Cambio permanente
|
||||
$fecha_nueva = $fecha_new;
|
||||
$fecha_clase = $fecha_cambio;
|
||||
|
||||
$fecha_new = DateTime::createFromFormat('d/m/Y', $fecha)->format('Y-m-d')." ".$hora;
|
||||
$fecha_cambio = DateTime::createFromFormat('d/m/Y', $fecha_cambio)->format('Y-m-d')." ".$hora;
|
||||
$fecha_fin_new = date("Y-m-d", strtotime($fecha_new))." ".$duracion_tiempo;
|
||||
$dia_new = date('w', strtotime($fecha_new));
|
||||
|
||||
$fecha_nueva = date('d/m/Y', strtotime($fecha_new));
|
||||
$fecha_clase = date('d/m/Y', strtotime($fecha_cambio));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user