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

[Feature]: number를 만 단위 표기법으로 변환하는 기능 #89

Closed
saengmotmi opened this issue May 10, 2024 · 2 comments
Closed

Comments

@saengmotmi
Copy link

Description

숫자를 받았을 때 n억 n천 n원 과 같은 원화 표기 문자열로 변환해주는 기능을 직접 구현하다가 라이브러리에 기여하면 좋겠다는 생각이 들어 제안드려봅니다.
참고로 현행 한글 맞춤법 체계에서는 만 단위로 끊어 쓰도록 하고 있고, 이를 한글과 숫자 양쪽으로 표현해주도록 하면 좋을 것 같습니다.

  • 이백삼십육만 칠천이백구십오(만 단위)
  • 1236만 7295
  • 1,236만 7295 (콜론 표기 등은 format옵션으로 제공하면 좋을 것 같습니다)

Possible Solution

  • number를 받아 4자리 chunk로 끊은 뒤 ["만", "억"] 등 단위에 매칭해줌
  • format 패턴이나 옵션을 입력 받아 4자리 숫자를 어떻게 표기할지 사용자가 결정하도록 함 (아직 API의 구체적인 형태까지는 고민해보지 못했습니다.)

etc.

No response

@saengmotmi
Copy link
Author

https://www.slash.page/ko/libraries/common/utils/src/Numbers_formatToKRW.i18n 와 중복으로 보여 이슈 close 합니다...

@okinawaa
Copy link
Member

숫자를 한글화 하는것도, 한글을 쉽게 다루는 방법중 하나이기 때문에 고려해보면 좋겠네요! 좋은 의견 감사해요!!

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

2 participants