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

[PROPOSTA] Formatador de valor aceitando valor para centavos #24

Open
rafaeltoledo opened this issue Jan 29, 2018 · 4 comments
Open

[PROPOSTA] Formatador de valor aceitando valor para centavos #24

rafaeltoledo opened this issue Jan 29, 2018 · 4 comments

Comments

@rafaeltoledo
Copy link
Contributor

É muito comum alguns backends devolverem valores monetários em centavos, para evitar o problema com o tipo float. Seria interessante termos a opção de formatar valores monetários em centavos.

@cs-victor-nascimento
Copy link
Contributor

Você quer dizer:

assertEquals(formatadorValores.formata("1000"), "R$ 10,00");

?

@cs-rafael-toledo
Copy link
Contributor

Exatamente

@cs-rafael-toledo
Copy link
Contributor

Ou melhor:
assertEquals(formataforValores.formata(1000), "R$ 10,00");

@oreis91
Copy link

oreis91 commented May 9, 2018

Alguém poderia me informar se tem como por valores inversos, vou explicar
digitei: 12000
A - 1
B - 12
C - 120
D - 1.200
E - 12.000

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

No branches or pull requests

4 participants