original_string: public function createExcelDate(\DateTime $date)
      {
          $day = clone $date;
          $endDate = $day->setTime(0, 0, 0);
          $startDate = new \DateTime('1970-01-01 00:00:00');
          $diff = $endDate->diff($startDate)->format('%a');
  
          if ($endDate < $startDate) {
              $daysBetween = 25569 - $diff;
          } else {
              $daysBetween = 25569 + $diff;
          }
  
          $seconds = $date->getTimestamp() - $endDate->getTimestamp();
  
          return (float)$daysBetween + ($seconds / 86400);
      }
code: public function createExcelDate(\DateTime $date)
      {
          $day = clone $date;
          $endDate = $day->setTime(0, 0, 0);
          $startDate = new \DateTime('1970-01-01 00:00:00');
          $diff = $endDate->diff($startDate)->format('%a');
  
          if ($endDate < $startDate) {
              $daysBetween = 25569 - $diff;
          } else {
              $daysBetween = 25569 + $diff;
          }
  
          $seconds = $date->getTimestamp() - $endDate->getTimestamp();
  
          return (float)$daysBetween + ($seconds / 86400);
      }
code_tokens: public function createExcelDate ( \ DateTime $ date ) { $ day = clone $ date ; $ endDate = $ day -> setTime ( 0 , 0 , 0 ) ; $ startDate = new \ DateTime ( '1970-01-01 00:00:00' ) ; $ diff = $ endDate -> diff ( $ startDate ) -> format ( '%a' ) ; if ( $ endDate < $ startDate ) { $ daysBetween = 25569 - $ diff ; } else { $ daysBetween = 25569 + $ diff ; } $ seconds = $ date -> getTimestamp ( ) - $ endDate -> getTimestamp ( ) ; return ( float ) $ daysBetween + ( $ seconds / 86400 ) ; }
docstring: Create Excel date stamp from DateTime
  
  @param \DateTime $date
  @return float number of days since 1900-01-00
docstring_tokens: Create Excel date stamp from DateTime