Skip to content

Commit 4fc01cf

Browse files
committed
minor #19093 fix the time formatting example (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- fix the time formatting example Commits ------- e0efe0a fix the time formatting example
2 parents 687c89c + e0efe0a commit 4fc01cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/console/helpers/formatterhelper.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,17 @@ If you don't want to use suffix at all, pass an empty string::
121121
// because length of the "test..." string is shorter than 10
122122

123123
Formatting Time
124-
~~~~~~~~~~~~~~~
124+
---------------
125125

126126
Sometimes you want to format seconds to time. This is possible with the
127-
:method:`Symfony\\Component\\Console\\Helper\\FormatterHelper::formatTime` method.
127+
:method:`Symfony\\Component\\Console\\Helper\\Helper::formatTime` method.
128128
The first argument is the seconds to format and the second argument is the
129129
precision (default ``1``) of the result::
130130

131-
$formatter->truncate(42); // 42 secs
132-
$formatter->truncate(125); // 2 mins
133-
$formatter->truncate(125, 2); // 2 mins, 5 secs
134-
$formatter->truncate(172799, 4); // 1 day, 23 hrs, 59 mins, 59 secs
131+
Helper::formatTime(42); // 42 secs
132+
Helper::formatTime(125); // 2 mins
133+
Helper::formatTime(125, 2); // 2 mins, 5 secs
134+
Helper::formatTime(172799, 4); // 1 day, 23 hrs, 59 mins, 59 secs
135135

136136
.. versionadded:: 6.4
137137

0 commit comments

Comments
 (0)