public static function PHPExcel_Calculation_DateTime::YEAR in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php \PHPExcel_Calculation_DateTime::YEAR()
* YEAR * * Returns the year corresponding to a date. * The year is returned as an integer in the range 1900-9999. * * Excel Function: * YEAR(dateValue) * *
Parameters
mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),: * PHP DateTime object, or a standard date string * @return int Year
8 calls to PHPExcel_Calculation_DateTime::YEAR()
- 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…
- PHPExcel_Calculation_Financial::AMORLINC in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Financial.php - * AMORLINC * * Returns the depreciation for each accounting period. * This function is provided for the French accounting system. If an asset is purchased in * the middle of the accounting period, the prorated depreciation is taken into…
- PHPExcel_Calculation_Financial::COUPDAYBS in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Financial.php - * COUPDAYBS * * Returns the number of days from the beginning of the coupon period to the settlement date. * * Excel Function: * COUPDAYBS(settlement,maturity,frequency[,basis]) * * @access public * @category Financial Functions *
- PHPExcel_Calculation_Financial::COUPDAYS in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Financial.php - * COUPDAYS * * Returns the number of days in the coupon period that contains the settlement date. * * Excel Function: * COUPDAYS(settlement,maturity,frequency[,basis]) * * @access public * @category Financial Functions *
- PHPExcel_Calculation_Financial::COUPDAYSNC in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Financial.php - * COUPDAYSNC * * Returns the number of days from the settlement date to the next coupon date. * * Excel Function: * COUPDAYSNC(settlement,maturity,frequency[,basis]) * * @access public * @category Financial Functions *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ DateTime.php, line 1253
Class
- PHPExcel_Calculation_DateTime
- PHPExcel_Calculation_DateTime
Code
public static function YEAR($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 PHPExcel_Calculation_Functions::NaN();
}
// Execute function
$PHPDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($dateValue);
return (int) $PHPDateObject
->format('Y');
}