daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function compruebaDif(){
  2.  
  3.  
  4.     if($this->primer_arhchivo){
  5.  
  6.         $this->spreadsheet = PhpOfficePhpSpreadsheetIOFactory::load( "Diciembre 01.xlsx");
  7.         $this->celda_fech = $this->spreadsheet->getActiveSheet()->getCell("E5")->getFormattedValue();
  8.  
  9.         $dt = new DateTime($this->celda_fech);
  10.         $nueva = $dt->format('d/m/Y');
  11.  
  12.         $this->subFecha = $nueva;
  13.  
  14.         echo $this->subFecha;
  15.  
  16.     }elseif (!$this->primer_arhchivo){
  17.  
  18.         $this->spreadsheet = PhpOfficePhpSpreadsheetIOFactory::load( "Diciembre 02.xlsx");
  19.         $this->celda_fech = $this->spreadsheet->getActiveSheet()->getCell("E5")->getFormattedValue();
  20.  
  21.         $dt = new DateTime($this->celda_fech);
  22.         $nueva = $dt->format('d/m/Y');
  23.  
  24.         $this->fechActual = $nueva;
  25.  
  26.         $this->diferencia = $this->fechActual->diff($this->subFecha);
  27.  
  28.         echo $this->diferencia;
  29.     }
  30.  
  31.  
  32.     $this->primer_arhchivo = true;
  33.  
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top