Convert seconds to compound duration: Difference between revisions

Content added Content deleted
m (added whitespace and indentation of tables.)
m (→‎{{header|Phix}}: added timedelta example)
Line 2,463: Line 2,463:
"1 day"
"1 day"
"9 weeks, 6 days, 10 hours, 40 minutes"
"9 weeks, 6 days, 10 hours, 40 minutes"
</pre>
You may also be interested in the timedelta() function, which converts durations to seconds, eg:
<lang Phix>include timedate.e
?elapsed(6000000-timedelta(days:=6,hours:=10))</lang>
{{out}}
<pre>
"9 weeks, 40 minutes"
</pre>
</pre>