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:
===Python: Procedural===
<lang python>>>> def duration(seconds):
for dm in (60, 60, 24, 7):
seconds, m = divmod(seconds, dm)
|