Rename MINUTEOFHOUR into MINUTE for consistency

This commit is contained in:
Adrien Crivelli 2016-10-02 09:41:20 +09:00
parent 7de0439b96
commit 75c34f2694
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
8 changed files with 10 additions and 10 deletions

View File

@ -30,7 +30,7 @@ CATEGORY_DATE_AND_TIME
EDATE PHPExcel_Calculation_DateTime::EDATE
EOMONTH PHPExcel_Calculation_DateTime::EOMONTH
HOUR PHPExcel_Calculation_DateTime::HOUROFDAY
MINUTE PHPExcel_Calculation_DateTime::MINUTEOFHOUR
MINUTE PHPExcel_Calculation_DateTime::MINUTE
MONTH PHPExcel_Calculation_DateTime::MONTHOFYEAR
NETWORKDAYS PHPExcel_Calculation_DateTime::NETWORKDAYS
NOW PHPExcel_Calculation_DateTime::DATETIMENOW

View File

@ -224,7 +224,7 @@ MIDB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_Tex
MIN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MIN
MINA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MINA
MINIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MINIF
MINUTE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::MINUTEOFHOUR
MINUTE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::MINUTE
MINVERSE CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MINVERSE
MIRR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::MIRR
MMULT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MMULT

View File

@ -663,7 +663,7 @@ $retVal = $worksheet->getCell('B4')->getCalculatedValue();
```php
$retVal = call_user_func_array(
array('PHPExcel_Calculation_Functions', 'MINUTEOFHOUR'),
array('PHPExcel_Calculation_Functions', 'MINUTE'),
array('09:30')
);
// $retVal = 30
@ -671,7 +671,7 @@ $retVal = call_user_func_array(
##### Notes
Note that the PHPExcel function is PHPExcel_Calculation_Functions::MINUTEOFHOUR() when the method is called statically.
Note that the PHPExcel function is PHPExcel_Calculation_Functions::MINUTE() when the method is called statically.
#### MONTH

View File

@ -39,7 +39,7 @@
EDATE | PHPExcel_Calculation_DateTime::EDATE
EOMONTH | PHPExcel_Calculation_DateTime::EOMONTH
HOUR | PHPExcel_Calculation_DateTime::HOUROFDAY
MINUTE | PHPExcel_Calculation_DateTime::MINUTEOFHOUR
MINUTE | PHPExcel_Calculation_DateTime::MINUTE
MONTH | PHPExcel_Calculation_DateTime::MONTHOFYEAR
NETWORKDAYS | PHPExcel_Calculation_DateTime::NETWORKDAYS
NOW | PHPExcel_Calculation_DateTime::DATETIMENOW

View File

@ -276,7 +276,7 @@
MIN | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MIN
MINA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MINA
MINIF | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MINIF
MINUTE | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::MINUTEOFHOUR
MINUTE | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::MINUTE
MINVERSE | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MINVERSE
MIRR | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::MIRR
MMULT | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MMULT

View File

@ -1307,7 +1307,7 @@ class Calculation
],
'MINUTE' => [
'category' => Calculation\Categories::CATEGORY_DATE_AND_TIME,
'functionCall' => '\\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTime::MINUTEOFHOUR',
'functionCall' => '\\PhpOffice\\PhpSpreadsheet\\Calculation\\DateTime::MINUTE',
'argumentCount' => '1',
],
'MINVERSE' => [

View File

@ -1358,7 +1358,7 @@ class DateTime
}
/**
* MINUTEOFHOUR
* MINUTE
*
* Returns the minutes of a time value.
* The minute is given as an integer, ranging from 0 to 59.
@ -1370,7 +1370,7 @@ class DateTime
* PHP DateTime object, or a standard time string
* @return int Minute
*/
public static function MINUTEOFHOUR($timeValue = 0)
public static function MINUTE($timeValue = 0)
{
$timeValue = $timeTester = Functions::flattenSingleValue($timeValue);

View File

@ -283,7 +283,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([DateTime::class, 'MINUTEOFHOUR'], $args);
$result = call_user_func_array([DateTime::class, 'MINUTE'], $args);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}