Skip to content

[Console] Helpers updated to optimize the time formating #19009

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

Merged

Conversation

maxbeckers
Copy link
Contributor

This PR fixes #19008. Adding documentation for the Console Helper. This optimizes the format for times like elapsed, remaining and estimated in the prohress bar.
It formats the e.g. 172799 seconds to 1 day, 23 hrs, 59 mins, 59 secs. In the ProgressBar it is shown in a precision 2, meaning in this example 1 day, 23 hrs. The abstract Symfony\\Component\\Console\\Helper\\Helper::formatTime allows to add a precision to the time format. The default is 1.

@maxbeckers maxbeckers force-pushed the patch-19008-progress-bar-format-time branch from 412d2b8 to 25ab36a Compare October 10, 2023 11:47
@maxbeckers
Copy link
Contributor Author

Thanks @OskarStark for your review :)

@OskarStark
Copy link
Contributor

Thank you Max.

@OskarStark OskarStark merged commit 82fe286 into symfony:6.4 Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Console] Add placeholders to ProgressBar for exact times
3 participants