Convert seconds to compound duration: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 1,520: | Line 1,520: | ||
</pre> |
</pre> |
||
=={{header|Delphi}}== |
|||
{{works with|Delphi|6.0}} |
|||
{{libheader|SysUtils,StdCtrls,DateUtils}} |
|||
<syntaxhighlight lang="Delphi"> |
|||
const TestData: array [0..2] of integer = (7259,86400,6000000); |
const TestData: array [0..2] of integer = (7259,86400,6000000); |
||
Line 1,552: | Line 1,558: | ||
Memo.Lines.Add(IntToStr(TestData[I])+' = '+SecondsToFormatDate(TestData[I])); |
Memo.Lines.Add(IntToStr(TestData[I])+' = '+SecondsToFormatDate(TestData[I])); |
||
end; |
end; |
||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
7259 = 2 hr, 59 sec, |
|||
86400 = 1 d, |
|||
6000000 = 9 wk, 6 d, 10 hr, 40 min, |
|||
Elapsed Time: 2.900 ms. |
|||
</pre> |
|||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |