You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parse_size('10 MiB') returns 10485760, as expected. However, parse_size('10 MiBs') returns 10000000, as does parse_size('10 MiByte') or parse_size('10 MiBytes').
In all cases, it should be 10485760.
The text was updated successfully, but these errors were encountered:
I've just released humanfriendly 7.1 which changes the situation slightly: If a trailing s was all that previously prevented correct matching then the match should now succeed. This tackles the 10 MiBs case and more generally the second comment here.
The 10 MiByte and 10 MiBytes cases are not (yet) handled as suggested because I'm divided about whether I want or should support this much diversity. I'd never seen these used before and Google reports about 10K matches, which is not exactly convincing 😇.
In any case I'll leave this open to enable discussion on this topic.
parse_size('10 MiB') returns 10485760, as expected. However, parse_size('10 MiBs') returns 10000000, as does parse_size('10 MiByte') or parse_size('10 MiBytes').
In all cases, it should be 10485760.
The text was updated successfully, but these errors were encountered: