Convert seconds to compound duration: Difference between revisions
→{{header|jq}}: use join/1
(jq) |
(→{{header|jq}}: use join/1) |
||
Line 88:
{{works with|jq|1.4}}
<lang jq>def seconds_to_time_string:
def nonzero(text): floor | if . > 0 then "
if . == 0 then "0 sec"
else
|
end;</lang>
Line 104:
<lang sh>$ jq -r -n -f Convert_seconds_to_compound_duration.jq
0: 0 sec
7259:
86400:
6000000:
=={{header|Perl}}==
|