Convert seconds to compound duration: Difference between revisions
m
→{{header|Perl 6}}: Combine into a single file for ease of testing
(added Factor) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Combine into a single file for ease of testing) |
||
Line 2,231:
($seconds.polymod(60, 60, 24, 7) Z <sec min hr d wk>)
.grep(*[0]).reverse.join(", ")
}
# Demonstration:
say "{.fmt: '%7d'} sec = {compound-duration $_}";
}</lang>
|