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

Implement Seconds Formatting Function #74

Merged

Conversation

xGOODDEVILx
Copy link
Contributor

This PR adds the secondsToTime function to format seconds into human-readable time strings in the following formats:

  • hh:mm:ss: Hours, minutes, and seconds
  • hh:mm: Hours and minutes
  • mm:ss: Minutes and seconds

Changes :

  • Function: Added secondsToTime for formatting seconds.
  • Test: Added test cases to ensure correct formatting and handle edge cases.
  • Documentation: Created an MDX file with usage examples and details.

@ASafaeirad
Copy link
Member

Thanks @gooddevil79, just a quick feedback, please rename the function to formatSeconds and separate seconds from options.

formatSeconds(seconds, { format })

@xGOODDEVILx xGOODDEVILx closed this Nov 3, 2024
@xGOODDEVILx xGOODDEVILx deleted the feat/implement-second-formatter branch November 3, 2024 19:15
@xGOODDEVILx xGOODDEVILx restored the feat/implement-second-formatter branch November 3, 2024 19:16
@xGOODDEVILx xGOODDEVILx reopened this Nov 3, 2024
@ASafaeirad ASafaeirad merged commit ccefd28 into fullstacksjs:main Nov 4, 2024
4 checks passed
@ASafaeirad
Copy link
Member

Thank you @gooddevil79.
Closes #68

Copy link

github-actions bot commented Nov 4, 2024

🎉 This PR is included in version 4.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@xGOODDEVILx
Copy link
Contributor Author

xGOODDEVILx commented Nov 4, 2024

Thank you for the chance to contribute . it’s an honor to be a small part of this project :) .
@ASafaeirad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants