mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-26 20:38:33 +00:00
50 lines
3.0 KiB
PHP
50 lines
3.0 KiB
PHP
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
|
|
|
return [
|
|
'Imperial from and to (mass)' => [1.942559385723E-03, 1.0, 'ozm', 'sg'],
|
|
'Same prefixed metric UoM' => [5.0, 5.0, 'kg', 'kg'],
|
|
'Imperial to prefixed metric' => [4.5359237E-01, 1.0, 'lbm', 'kg'],
|
|
'Prefixed metric to prefixed metric, same unit' => [0.2, 2.0, 'hg', 'kg'],
|
|
'Unprefixed metric to prefixed metric, same unit' => [12.345, 12345, 'm', 'km'],
|
|
'Prefixed metric to unprefixed metric, same unit' => [12345.0, 12.345, 'km', 'm'],
|
|
'Prefixed metric to imperial' => [0.62137119223732995, 1, 'km', 'mi'],
|
|
'Prefixed metric to alternative metric' => [1.23450e5, 12.345, 'um', 'ang'],
|
|
'Prefixed metric to alternative prefixed metric' => [1.2345E+02, 12.345, 'um', 'kang'],
|
|
'Prefixed metric to 2-character prefixed metric, same unit' => [1000.0, 100.0, 'hl', 'dal'],
|
|
'Imperial to Imperial (distance)' => [1.0, 3.0, 'ft', 'yd'],
|
|
[20.0, 68, 'F', 'C'],
|
|
[68.0, 20, 'C', 'F'],
|
|
[293.145, 67.991, 'F', 'K'],
|
|
[67.991, 293.145, 'K', 'F'],
|
|
[-273.15, 0, 'K', 'C'],
|
|
[-459.67, 0, 'K', 'F'],
|
|
[295.15, 22, 'C', 'K'],
|
|
[22.5, 295.65, 'K', 'C'],
|
|
'Melting Point of Titanium (K to C)' => [1667.85, 1941, 'K', 'C'],
|
|
'Melting Point of Titanium (K to F)' => [3034.13, 1941, 'K', 'F'],
|
|
'Melting Point of Titanium (K to Rankine)' => [3493.8, 1941, 'K', 'Rank'],
|
|
'Melting Point of Titanium (K to Réaumur)' => [1334.28, 1941, 'K', 'Reau'],
|
|
'Melting Point of Titanium (Rankine to K)' => [1941.0, 3493.8, 'Rank', 'K'],
|
|
'Melting Point of Titanium (Réaumur to K)' => [1941.0, 1334.28, 'Reau', 'K'],
|
|
'Temperature synonyms (K)' => [123.45, 123.45, 'K', 'kel'],
|
|
'Temperature synonyms (C)' => [123.45, 123.45, 'C', 'cel'],
|
|
'Temperature synonyms (F)' => [123.45, 123.45, 'F', 'fah'],
|
|
'Invalid value to convert' => [ExcelError::VALUE(), 'three', 'ft', 'yds'],
|
|
'Imperial to 2-character prefixed imperial, same unit' => [ExcelError::NA(), 100.0, 'pt', 'dapt'],
|
|
'Prefixed metric to binary prefixed metric' => [ExcelError::NA(), 12.345, 'um', 'kiang'],
|
|
'Mismatched categories' => [ExcelError::NA(), 1, 'ft', 'day'],
|
|
'From prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'kpt', 'lt'],
|
|
'To prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'lt', 'kpt'],
|
|
'From binary prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'kiqt', 'pt'],
|
|
'To binary prefixed Imperial (Invalid)' => [ExcelError::NA(), 234.56, 'pt', 'kiqt'],
|
|
'From prefixed Imperial 2 (Invalid)' => [ExcelError::NA(), 12345.6, 'baton', 'cwt'],
|
|
'To prefixed Imperial 2 (Invalid)' => [ExcelError::NA(), 12345.6, 'cwt', 'baton'],
|
|
'Invalid from unit' => [ExcelError::NA(), 234.56, 'xxxx', 'm'],
|
|
'Invalid to unit' => [ExcelError::NA(), 234.56, 'm', 'xxxx'],
|
|
'Basic Information conversion' => [2, 16, 'bit', 'byte'],
|
|
'Information with standard metric prefix' => [1000, 1, 'kbyte', 'byte'],
|
|
'Information with binary prefix' => [1024, 1, 'kibyte', 'byte'],
|
|
];
|