You are here

public static function PHPExcel_Calculation_DateTime::_getDateValue in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php \PHPExcel_Calculation_DateTime::_getDateValue()

* _getDateValue * *

Parameters

string $dateValue: * @return mixed Excel date/time serial value, or string if error

22 calls to PHPExcel_Calculation_DateTime::_getDateValue()
PHPExcel_Calculation_DateTime::DATEDIF in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php
* DATEDIF * *
PHPExcel_Calculation_DateTime::DAYOFMONTH in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php
* DAYOFMONTH * * Returns the day of the month, for a specified date. The day is given as an integer * ranging from 1 to 31. * * Excel Function: * DAY(dateValue) * *
PHPExcel_Calculation_DateTime::DAYOFWEEK in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php
* DAYOFWEEK * * Returns the day of the week for a specified date. The day is given as an integer * ranging from 0 to 7 (dependent on the requested style). * * Excel Function: * WEEKDAY(dateValue[,style]) * *
PHPExcel_Calculation_DateTime::DAYS360 in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php
* DAYS360 * * Returns the number of days between two dates based on a 360-day year (twelve 30-day months), * which is used in some accounting calculations. Use this function to help compute payments if * your accounting system is based on…
PHPExcel_Calculation_DateTime::EDATE in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php
* EDATE * * Returns the serial number that represents the date that is the indicated number of months * before or after a specified date (the start_date). * Use EDATE to calculate maturity dates or due dates that fall on the same day of the…

... See full list

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php, line 101

Class

PHPExcel_Calculation_DateTime
PHPExcel_Calculation_DateTime

Code

public static function _getDateValue($dateValue) {
  if (!is_numeric($dateValue)) {
    if (is_string($dateValue) && PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) {
      return PHPExcel_Calculation_Functions::VALUE();
    }
    if (is_object($dateValue) && $dateValue instanceof DateTime) {
      $dateValue = PHPExcel_Shared_Date::PHPToExcel($dateValue);
    }
    else {
      $saveReturnDateType = PHPExcel_Calculation_Functions::getReturnDateType();
      PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
      $dateValue = self::DATEVALUE($dateValue);
      PHPExcel_Calculation_Functions::setReturnDateType($saveReturnDateType);
    }
  }
  return $dateValue;
}