diff --git a/Documentation/FunctionListByCategory.txt b/Documentation/FunctionListByCategory.txt index b1eced62..a9f29a54 100644 --- a/Documentation/FunctionListByCategory.txt +++ b/Documentation/FunctionListByCategory.txt @@ -34,7 +34,7 @@ CATEGORY_DATE_AND_TIME MONTH PHPExcel_Calculation_DateTime::MONTHOFYEAR NETWORKDAYS PHPExcel_Calculation_DateTime::NETWORKDAYS NOW PHPExcel_Calculation_DateTime::DATETIMENOW - SECOND PHPExcel_Calculation_DateTime::SECONDOFMINUTE + SECOND PHPExcel_Calculation_DateTime::SECOND TIME PHPExcel_Calculation_DateTime::TIME TIMEVALUE PHPExcel_Calculation_DateTime::TIMEVALUE TODAY PHPExcel_Calculation_DateTime::DATENOW diff --git a/Documentation/FunctionListByName.txt b/Documentation/FunctionListByName.txt index e347a242..d498dd3b 100644 --- a/Documentation/FunctionListByName.txt +++ b/Documentation/FunctionListByName.txt @@ -302,7 +302,7 @@ RTD CATEGORY_LOOKUP_AND_REFERENCE *** Not yet Implemented SEARCH CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHINSENSITIVE SEARCHB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHINSENSITIVE -SECOND CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::SECONDOFMINUTE +SECOND CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::SECOND SERIESSUM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SERIESSUM SIGN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SIGN SIN CATEGORY_MATH_AND_TRIG sin diff --git a/Documentation/markdown/CalculationEngine/FunctionReference/03-03-Date-and-Time-Functions.md b/Documentation/markdown/CalculationEngine/FunctionReference/03-03-Date-and-Time-Functions.md index 7f11ac34..68c9e357 100644 --- a/Documentation/markdown/CalculationEngine/FunctionReference/03-03-Date-and-Time-Functions.md +++ b/Documentation/markdown/CalculationEngine/FunctionReference/03-03-Date-and-Time-Functions.md @@ -846,7 +846,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue(); ```php $retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'SECONDOFMINUTE'), + array('PHPExcel_Calculation_Functions', 'SECOND'), array('09:30:17') ); // $retVal = 17 @@ -854,7 +854,7 @@ $retVal = call_user_func_array( ##### Notes -Note that the PHPExcel function is PHPExcel_Calculation_Functions::SECONDOFMINUTE() when the method is called statically. +Note that the PHPExcel function is PHPExcel_Calculation_Functions::SECOND() when the method is called statically. #### TIME diff --git a/Documentation/markdown/Functions/FunctionListByCategory.md b/Documentation/markdown/Functions/FunctionListByCategory.md index b4753751..c19400cd 100644 --- a/Documentation/markdown/Functions/FunctionListByCategory.md +++ b/Documentation/markdown/Functions/FunctionListByCategory.md @@ -43,7 +43,7 @@ MONTH | PHPExcel_Calculation_DateTime::MONTHOFYEAR NETWORKDAYS | PHPExcel_Calculation_DateTime::NETWORKDAYS NOW | PHPExcel_Calculation_DateTime::DATETIMENOW - SECOND | PHPExcel_Calculation_DateTime::SECONDOFMINUTE + SECOND | PHPExcel_Calculation_DateTime::SECOND TIME | PHPExcel_Calculation_DateTime::TIME TIMEVALUE | PHPExcel_Calculation_DateTime::TIMEVALUE TODAY | PHPExcel_Calculation_DateTime::DATENOW diff --git a/Documentation/markdown/Functions/FunctionListByName.md b/Documentation/markdown/Functions/FunctionListByName.md index f7ccd0df..0c72aa26 100644 --- a/Documentation/markdown/Functions/FunctionListByName.md +++ b/Documentation/markdown/Functions/FunctionListByName.md @@ -378,7 +378,7 @@ --------------------|--------------------------------|------------------------------------------- SEARCH | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::SEARCHINSENSITIVE SEARCHB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::SEARCHINSENSITIVE - SECOND | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::SECONDOFMINUTE + SECOND | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::SECOND SERIESSUM | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SERIESSUM SIGN | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SIGN SIN | CATEGORY_MATH_AND_TRIG | sin diff --git a/src/PhpSpreadsheet/Calculation.php b/src/PhpSpreadsheet/Calculation.php index ca70b9c4..f9eb522e 100644 --- a/src/PhpSpreadsheet/Calculation.php +++ b/src/PhpSpreadsheet/Calculation.php @@ -1670,7 +1670,7 @@ class Calculation ], 'SECOND' => [ 'category' => Calculation\Categories::CATEGORY_DATE_AND_TIME, - 'functionCall' => '\\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTime::SECONDOFMINUTE', + 'functionCall' => '\\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTime::SECOND', 'argumentCount' => '1', ], 'SERIESSUM' => [ diff --git a/src/PhpSpreadsheet/Calculation/DateTime.php b/src/PhpSpreadsheet/Calculation/DateTime.php index 3deaf06e..a748c4eb 100644 --- a/src/PhpSpreadsheet/Calculation/DateTime.php +++ b/src/PhpSpreadsheet/Calculation/DateTime.php @@ -1398,7 +1398,7 @@ class DateTime } /** - * SECONDOFMINUTE + * SECOND * * Returns the seconds of a time value. * The second is given as an integer in the range 0 (zero) to 59. @@ -1410,7 +1410,7 @@ class DateTime * PHP DateTime object, or a standard time string * @return int Second */ - public static function SECONDOFMINUTE($timeValue = 0) + public static function SECOND($timeValue = 0) { $timeValue = Functions::flattenSingleValue($timeValue); diff --git a/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php b/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php index 2c840e57..bc25d58d 100644 --- a/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php @@ -299,7 +299,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'SECONDOFMINUTE'], $args); + $result = call_user_func_array([DateTime::class, 'SECOND'], $args); $this->assertEquals($expectedResult, $result, null, 1E-8); }