-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: Formatting duration in multiple time units #897
Comments
Would also be awesome if we could display it with in zero padded units, such as: dayjs.duration({ s: 12345678 }).format('HH:mm:ss') Is there anything like that? |
@glennreyes something like this? #641 (comment) |
@guanzo looks like a sweet solution. |
@iamkun is that how you're supposed to do it tho? I sort of tried random combinations of dayjs methods until it worked lmao |
@guanzo Don't have a plan yet. |
@iamkun I edited my linked comment. My "solution" only works for durations < 24 hours, and trying it with vanilla moment yields the same issue. I linked a reputable community plugin that does it correctly, dayjs may need something similar. https://github.com/jsmreese/moment-duration-format |
This sort-of can be done with |
What's the status of this? Would love to have this feature as well! |
maybe create a another plugin to support |
Any solution to @Alanscut problem ? We have same. date-fns do this easilly but dayjs is a mess for this part.... |
Describe the bug
Formatting duration via
.humanize()
could be also achieved with multiple time units. e.g.The text was updated successfully, but these errors were encountered: