Convert seconds to compound duration: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (add REXX) |
m (→Python: Procedural: copy-paste error fixed.) |
||
Line 159: | Line 159: | ||
===Python: Procedural=== |
===Python: Procedural=== |
||
<lang python>>>> def duration(seconds): |
<lang python>>>> def duration(seconds): |
||
t= [] |
|||
for dm in (60, 60, 24, 7): |
for dm in (60, 60, 24, 7): |
||
seconds, m = divmod(seconds, dm) |
seconds, m = divmod(seconds, dm) |