@@ 947-955 (lines=9) @@ | ||
944 | * |
|
945 | * @return string short representation |
|
946 | */ |
|
947 | public static function sizeCalc($uSize, $uPrecision = 0) |
|
948 | { |
|
949 | static $sSize = " KMGT"; |
|
950 | for ($tCount = 0; $uSize >= 1024; $uSize /= 1024, $tCount++) { |
|
951 | ; |
|
952 | } |
|
953 | ||
954 | return round($uSize, $uPrecision) . " {$sSize[$tCount]}B"; |
|
955 | } |
|
956 | ||
957 | /** |
|
958 | * Returns the given number in short representation |
|
@@ 965-973 (lines=9) @@ | ||
962 | * |
|
963 | * @return string short representation |
|
964 | */ |
|
965 | public static function quantityCalc($uSize, $uPrecision = 0) |
|
966 | { |
|
967 | static $sSize = " KMGT"; |
|
968 | for ($tCount = 0; $uSize >= 1000; $uSize /= 1000, $tCount++) { |
|
969 | ; |
|
970 | } |
|
971 | ||
972 | return round($uSize, $uPrecision) . $sSize[$tCount]; |
|
973 | } |
|
974 | ||
975 | /** |
|
976 | * Returns the given period in short representation |