镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Open

Description

@hikari-no-yume

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

Activity

  1. Bilge commented on Dec 30, 2015

    @Bilge
    Member

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

  2. hikari-no-yume commented on Dec 30, 2015

    @hikari-no-yume
    Author

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

  3. Bilge commented on Dec 30, 2015

    @Bilge
    Member

    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.

  4. reopened this on Dec 31, 2015
  5. Bilge commented on Dec 31, 2015

    @Bilge
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions