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

Support for decimal place display #124

Open
almandsky opened this issue Oct 20, 2019 · 1 comment
Open

Support for decimal place display #124

almandsky opened this issue Oct 20, 2019 · 1 comment

Comments

@almandsky
Copy link

Instead of always round to integer, if it can round to certain decimal place it will be great!

For example:

ms(60000, {decimal: 1 })                            // "1m"
ms(66000, {decimal: 1 })                            // "1.1m"
ms(-3 * 66000, { long: true, decimal: 1 })          // "-3.3 minutes"
ms(234234234, { decimal: 2  })                      // "2.71m"
ms(ms('10.5 hours'), { long: true, decimal: 1 })    // "10.5 hours"
@imranbarbhuiya
Copy link

how can i use that? as ms(66000, {decimal: 1 }) isn't working

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