public static function PHPExcel_Calculation_DateTime::DAYOFMONTH in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php \PHPExcel_Calculation_DateTime::DAYOFMONTH()
* 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) * *
Parameters
mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),: * PHP DateTime object, or a standard date string * @return int Day of the month
1 call to PHPExcel_Calculation_DateTime::DAYOFMONTH()
- PHPExcel_Calculation_DateTime::YEARFRAC in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ DateTime.php - * YEARFRAC * * Calculates the fraction of the year represented by the number of whole days between two dates * (the start_date and the end_date). * Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits…
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ DateTime.php, line 1071
Class
- PHPExcel_Calculation_DateTime
- PHPExcel_Calculation_DateTime
Code
public static function DAYOFMONTH($dateValue = 1) {
$dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue);
if ($dateValue === null) {
$dateValue = 1;
}
elseif (is_string($dateValue = self::_getDateValue($dateValue))) {
return PHPExcel_Calculation_Functions::VALUE();
}
elseif ($dateValue == 0.0) {
return 0;
}
elseif ($dateValue < 0.0) {
return PHPExcel_Calculation_Functions::NaN();
}
// Execute function
$PHPDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($dateValue);
return (int) $PHPDateObject
->format('j');
}