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

[FR] s 포맷 지원 #2

Open
wonderlandpark opened this issue Jan 10, 2021 · 1 comment
Open

[FR] s 포맷 지원 #2

wonderlandpark opened this issue Jan 10, 2021 · 1 comment

Comments

@wonderlandpark
Copy link

d3/d3-formats 포맷이 있습니다.

d3.format("s")(1500);  // "1.50000k"
d3.format("~s")(1500); // "1.5k"

이를 1.3만 3천 4.5만 등처럼 한글로도 표시할 수 있으면 좋을거 같습니다.

@JunhoeKim
Copy link
Owner

JunhoeKim commented Aug 5, 2021

늦은 답변 죄송합니다.
이 모듈을 디자인할 당시에 한글은 SI 단위계를 따르고 있지 않아서 format 방법을 사용하여 표현하도록 디자인했습니다.

uck.format('f만')(15000); // "1.5만"
uck.format('f천')(1500);  // "1.5천"

의 표현은 부족할까요?

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