mirror of
https://github.com/shuchkin/simplexlsxgen.git
synced 2023-08-10 21:12:59 +03:00
Merge pull request #34 from marcrobledo/marcrobledo-fix-percentage
fix percentage with decimals
This commit is contained in:
commit
41c6e7ca51
@ -476,7 +476,7 @@ class SimpleXLSXGen {
|
|||||||
} elseif ( preg_match( '/^([-+]?\d+)%$/', $v, $m ) ) {
|
} elseif ( preg_match( '/^([-+]?\d+)%$/', $v, $m ) ) {
|
||||||
$cv = round( $m[1] / 100, 2 );
|
$cv = round( $m[1] / 100, 2 );
|
||||||
$N = self::N_PERCENT_INT; // [9] 0%
|
$N = self::N_PERCENT_INT; // [9] 0%
|
||||||
} elseif ( preg_match( '/^([-+]\d+\.\d+)%$/', $v, $m ) ) {
|
} elseif ( preg_match( '/^([-+]?\d+\.\d+)%$/', $v, $m ) ) {
|
||||||
$cv = round( $m[1] / 100, 4 );
|
$cv = round( $m[1] / 100, 4 );
|
||||||
$N = self::N_PRECENT_DEC; // [10] 0.00%
|
$N = self::N_PRECENT_DEC; // [10] 0.00%
|
||||||
} elseif ( preg_match( '/^(\d\d\d\d)-(\d\d)-(\d\d)$/', $v, $m ) ) {
|
} elseif ( preg_match( '/^(\d\d\d\d)-(\d\d)-(\d\d)$/', $v, $m ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user