Convert seconds to compound duration: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl}}: use 'printf' instead of 'print sprintf')
m (tiny clarification)
Line 1:
{{draft task}}
Write a function or program which
* takes ana integerpositive valueinteger representing a duration in seconds as input (e.g. <code>100</code>), and
* returns a string which shows the same duration decomposed into weeks, days, hours, minutes, and seconds as detailed below (e.g. "<code>1 min, 40 sec</code>").
 
Line 26:
 
<ul>
<li>The following five units should be representedused:
{| class="wikitable"
|-