Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B is the standard symbol for byte in all cases. SUFFIX_IEC = 'iB' isn't a thing #6

Open
hikari-no-yume opened this issue Dec 30, 2015 · 4 comments

Comments

@hikari-no-yume
Copy link

The IEC prefixes are Ki, Mi, Gi, etc. so the i belongs with the prefix, not the suffix.

As pointed out on reddit: https://www.reddit.com/r/PHP/comments/3yq3yx/byteformatter_is_a_psr2_compliant_library_that/cygfps8

@Bilge
Copy link
Member

Bilge commented Dec 30, 2015

I'm not entirely sure what this means. Can you explain further?

@hikari-no-yume
Copy link
Author

-iB isn't a suffix, the 'i' is part of the prefix. You wouldn't have 1000iB, you'd have 1000B.

@Bilge
Copy link
Member

Bilge commented Dec 30, 2015

The term suffix is used here to mean the unit is suffixed to the value. i.e. the value is the prefix and the units are the suffix.

@Bilge Bilge closed this as completed Dec 31, 2015
@Bilge Bilge reopened this Dec 31, 2015
@Bilge Bilge removed the invalid label Dec 31, 2015
@Bilge
Copy link
Member

Bilge commented Dec 31, 2015

The issue is with the distinction between prefix and suffix as defined in SymbolDecorator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants