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 Request] add full time mode in Humanize #2022

Open
lqzhgood opened this issue Aug 10, 2022 · 1 comment
Open

[Feature Request] add full time mode in Humanize #2022

lqzhgood opened this issue Aug 10, 2022 · 1 comment

Comments

@lqzhgood
Copy link

dayjs.duration(100, "s").humanize();  --> //  2 分钟

full time mode

dayjs.duration(100, "s").humanize( {full:true} ); --> // 1分40秒
@magicdawn
Copy link

console.log(dayjs.duration(8, 's').humanize())
console.log(dayjs.duration(1, 's').humanize())
console.log(dayjs.duration(10, 's').humanize())

// a few seconds
// a few seconds
// a few seconds

a few seconds makes 1 equal to 10, +1 on more accurate humanize output

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