-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Feat: Format duration ms to duration #1477
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
Feat: Format duration ms to duration #1477
Conversation
Feature two sum function
Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code is fine, has tests and docs. I'm not sure whether we can consider this algorithmically interesting enough, though. The string formatting logic here is pretty straightforward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add a msToDuration
function here?
@appgurueu it is a related function to the same which converts ms to some other string that's why I have added that here in this pr |
I don't really see a point in having two functions around which do similar things. Still, the main question persists: What does this - algorithmically - teach a reader? |
so we have video playforms in that the second function can be used to show the live duration and the other one is kinda hard to tell what will be helpful from that @appgurueu |
i have faced this one i have to make an timer for OTP for that I have to take 30 sec, 5 min , 30 min. so in this case I have made this algo for first function which has names in output. second one was a video player to show live duration counter as I was getting data as ms |
That is not the point @developerr-ayush. It maybe a useful modular piece of code, but remember that this repository is not supposed to be used as a module. All the code added here should provide some educational value to the reader, and therefore useful but trivial algorithms won't be accepted. |
Okay i think its useless then |
Describe your change:
Checklist:
Example:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.