Convert seconds to compound duration: Difference between revisions
Convert seconds to compound duration (view source)
Revision as of 19:38, 4 October 2020
, 3 years ago→{{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>
|