Humanize.jl icon indicating copy to clipboard operation
Humanize.jl copied to clipboard

The negative data size values are not scaled correctly

Open dmitry-v-vlasov opened this issue 6 years ago • 0 comments

julia> using Humanize

julia> Humanize.datasize(161803; style=:dec, format="%.3f")
"161.803 kB"

julia> Humanize.datasize(161803; style=:gnu, format="%.3f")
"158.011K"

julia> Humanize.datasize(-161803; style=:dec, format="%.3f")
"-161803.000 B"

julia> Humanize.datasize(-161803; style=:gnu, format="%.3f")
"-161803.000"

Look at the values

"-161803.000 B"

for the decimal style and

"-161803.000"

for the GNU style.

dmitry-v-vlasov avatar Feb 07 '19 12:02 dmitry-v-vlasov