Convert seconds to compound duration: Difference between revisions

Content added Content deleted
mNo edit summary
Line 1,228:
=={{header|Ring}}==
<lang ring>
sec = 60000006000005
week = floor(sec/60/60/24/7)
if week > 0 see sec
Line 1,237:
hour = floor(sec/60/60) % 24
if hour > 0 see hour
see " hours " ok
minute = floor(sec/60) % 60
if hourminute > 0 see minute
see " minutes " + nl ok
second = sec % 60
if second > 0 see second
see " seconds" + nl ok
</lang>