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

Adiciona opção de escala curta e longa #29

Merged
merged 4 commits into from
Apr 27, 2020
Merged

Adiciona opção de escala curta e longa #29

merged 4 commits into from
Apr 27, 2020

Conversation

theuves
Copy link
Member

@theuves theuves commented Apr 27, 2020

Referente a issue #19 e PR #23


Fiz um implementação diferente (da PR #23) para a adição da opção para escala curta e longa.

As definições da escala é feita diretamente na lista dos números (em src/get-list.js).

A escala curta é padrão no português brasileiro (idioma padrão dessa biblioteca).

Nessa implementação a escala longa NÃO É A PADRÃO para o português de Portugal.

Nomenclatura

  • short - curta (padrão)
  • long - longa

Exemplo

extenso('2.000.000.001') // 'dois bilhões e um'
extenso('2.000.000.001', { scale: 'short' }) // 'dois bilhões e um'
extenso('2.000.000.001', { scale: 'long' }) // 'dois mil milhões e um'

@theuves theuves self-assigned this Apr 27, 2020
@theuves theuves added the new features Describe the new feature you would like to see implemented label Apr 27, 2020
@theuves theuves merged commit 9cdb6b0 into master Apr 27, 2020
@theuves theuves mentioned this pull request Apr 27, 2020
@theuves theuves deleted the dev branch July 12, 2020 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new features Describe the new feature you would like to see implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant