public function createDataReserva($hotelPickUp, $checkIn, $checkOut) { $dataReservation = new DatosReserva(); $dataReservation->setHotelPickUp($hotelPickUp); $dataReservation->setCheckIn(new \DateTime(DateUtil::formatDateMysql($checkIn))); $dataReservation->setCheckOut(is_null($checkOut) ? $checkOut : new \DateTime(DateUtil::formatDateMysql($checkOut))); return $dataReservation; }
public function createDatosVuelo(VentaCompletaTO $ventaCompletaTO) { $datosVuelo = new DatosVuelo(); $datosVuelo->setAerolinea($ventaCompletaTO->getAerolinea()); $datosVuelo->setNumeroVuelo($ventaCompletaTO->getNumeroVuelo()); if ($ventaCompletaTO->getFechaLlegada() != '') { $datosVuelo->setFechaLlegada(new \DateTime(DateUtil::formatDateMysql($ventaCompletaTO->getFechaLlegada()))); } $datosVuelo->setHoraLlegada(new \DateTime(date("H:i", strtotime($ventaCompletaTO->getHoraLlegada())))); return $datosVuelo; }