daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (!empty($form['first_contract_date']) && !empty($form['last_contract_date'])) {
  2.     $first_contract_date_OBJ = DateTime::createFromFormat('d/m/Y', $form['first_contract_date']);
  3.     $last_contract_date_OBJ = DateTime::createFromFormat('d/m/Y', $form['last_contract_date']);
  4.  
  5.        
  6.        
  7.     $contract_date_interval = $first_contract_date_OBJ->diff($last_contract_date_OBJ, true);
  8.     $form['total_contract_day'] = $contract_date_interval->format('%a');
  9.        
  10.  
  11.     }
  12.    
  13.     $form['total_test_event_contract_day'] = '';
  14.     // calcul d'intervalles
  15.     if (!empty($form['test_event_first_contract_date']) && !empty($form['test_event_last_contract_date'])) {
  16.     $test_event_first_contract_date_OBJ = DateTime::createFromFormat('d/m/Y', $form['test_event_first_contract_date']);
  17.     $test_event_last_contract_date_OBJ = DateTime::createFromFormat('d/m/Y', $form['test_event_last_contract_date']);
  18.        
  19.     $test_event_contract_date_interval = $test_event_first_contract_date_OBJ->diff($test_event_last_contract_date_OBJ, true);
  20.     $form['total_test_event_contract_day'] = $test_event_contract_date_interval->format('%a');
  21.            
  22.     }
  23.     exit();
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