Skip to content

money notation #94

@lfaoro

Description

@lfaoro

In metric, you'd use M (mega) for million, G (giga) for billion and T (tera) for trillion.

In finance I have seen million, billion, and trillion abbreviated as M, B, and T respectively, although there doesn't seem to be a rule about it, only a best practice used in finance.

Would you allow me to add a pull request with this feature?

e.g.

humanize.Finance(2,475,260,494,216) outputs: $2.47T
humanize.Finance(2,475,260,494) outputs: $2.47B
humanize.Finance(2,475,260) outputs: $2.47M
humanize.Finance(2,475) outputs: $2.47K

NB: I added commas to make the numbers readable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions