Convert seconds to compound duration: Difference between revisions

 
Line 2,548:
 
=={{header|langur}}==
<syntaxhighlight lang="langur">val .duration = ffn(var .sec) {
[
wfw/wk d hr min sec/,
for[=[]] .dm in [7 x* 24 x* 60 x* 60, 24 x* 60 x* 60, 60 x* 60, 60] {
_for ~= [.sec \ .dm]
.sec = .sec rem= .dm
} ~ [.sec],
]
885

edits