Jump to content

Convert seconds to compound duration: Difference between revisions

m
→‎{{header|Phix}}: added timedelta example
m (added whitespace and indentation of tables.)
m (→‎{{header|Phix}}: added timedelta example)
Line 2,463:
"1 day"
"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>
 
7,805

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.