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

money notation #94

Open
lfaoro opened this issue Aug 28, 2021 · 0 comments · May be fixed by #95
Open

money notation #94

lfaoro opened this issue Aug 28, 2021 · 0 comments · May be fixed by #95

Comments

@lfaoro
Copy link

lfaoro commented Aug 28, 2021

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.

@lfaoro lfaoro linked a pull request Aug 29, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant