<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://hrwiki.org/w/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://hrwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3Aformat_seconds</id>
		<title>Template:format seconds - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://hrwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3Aformat_seconds"/>
		<link rel="alternate" type="text/html" href="http://hrwiki.org/w/index.php?title=Template:format_seconds&amp;action=history"/>
		<updated>2026-08-26T14:17:19Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.15.4</generator>

	<entry>
		<id>http://hrwiki.org/w/index.php?title=Template:format_seconds&amp;diff=836110&amp;oldid=prev</id>
		<title>Stux:&amp;#32;only pad minutes when there are hours</title>
		<link rel="alternate" type="text/html" href="http://hrwiki.org/w/index.php?title=Template:format_seconds&amp;diff=836110&amp;oldid=prev"/>
				<updated>2025-01-02T03:05:18Z</updated>
		
		<summary type="html">&lt;p&gt;only pad minutes when there are hours&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 03:05, 2 January 2025&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#ifexpr: ({{{1}}}&amp;gt;=3600)|{{#expr: ({{{1}}}-({{{1}}} mod 3600))/3600}}:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;|}}&lt;/del&gt;&amp;lt;!-- /* Calculate the hours and only display more than 0 hours. */&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#ifexpr: ({{{1}}}&amp;gt;=3600)|{{#expr: ({{{1}}}-({{{1}}} mod 3600))/3600}}:&amp;lt;!-- /* Calculate the hours and only display more than 0 hours. */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--&amp;gt;{{#ifexpr: ((({{{1}}}-({{{1}}} mod 60))/60) mod 60)&amp;lt;10|0|}}&amp;lt;!-- /* Calculate the minutes and pad with leading zero if less than 10. */&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--&amp;gt;{{#ifexpr: ((({{{1}}}-({{{1}}} mod 60))/60) mod 60)&amp;lt;10|0&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|}}&lt;/ins&gt;|}}&amp;lt;!-- /* Calculate the minutes and pad with leading zero if less than 10&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. Padding of minutes is only shown when there are hours to display&lt;/ins&gt;. */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--&amp;gt;{{#expr: (({{{1}}}-({{{1}}} mod 60))/60) mod 60}}:&amp;lt;!-- /* Calculate the minutes. */&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--&amp;gt;{{#expr: (({{{1}}}-({{{1}}} mod 60))/60) mod 60}}:&amp;lt;!-- /* Calculate the minutes. */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--&amp;gt;{{#ifexpr: ({{{1}}} mod 60)&amp;lt;10|0|}}&amp;lt;!-- /* Calculate the seconds and pad with leading zero if less than 10. */&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--&amp;gt;{{#ifexpr: ({{{1}}} mod 60)&amp;lt;10|0|}}&amp;lt;!-- /* Calculate the seconds and pad with leading zero if less than 10. */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-08-26 14:17:19 --&gt;
&lt;/table&gt;</summary>
		<author><name>Stux</name></author>	</entry>

	<entry>
		<id>http://hrwiki.org/w/index.php?title=Template:format_seconds&amp;diff=836099&amp;oldid=prev</id>
		<title>Stux:&amp;#32;new template</title>
		<link rel="alternate" type="text/html" href="http://hrwiki.org/w/index.php?title=Template:format_seconds&amp;diff=836099&amp;oldid=prev"/>
				<updated>2025-01-01T23:48:12Z</updated>
		
		<summary type="html">&lt;p&gt;new template&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#ifexpr: ({{{1}}}&amp;gt;=3600)|{{#expr: ({{{1}}}-({{{1}}} mod 3600))/3600}}:|}}&amp;lt;!-- /* Calculate the hours and only display more than 0 hours. */&lt;br /&gt;
--&amp;gt;{{#ifexpr: ((({{{1}}}-({{{1}}} mod 60))/60) mod 60)&amp;lt;10|0|}}&amp;lt;!-- /* Calculate the minutes and pad with leading zero if less than 10. */&lt;br /&gt;
--&amp;gt;{{#expr: (({{{1}}}-({{{1}}} mod 60))/60) mod 60}}:&amp;lt;!-- /* Calculate the minutes. */&lt;br /&gt;
--&amp;gt;{{#ifexpr: ({{{1}}} mod 60)&amp;lt;10|0|}}&amp;lt;!-- /* Calculate the seconds and pad with leading zero if less than 10. */&lt;br /&gt;
--&amp;gt;{{#expr:{{{1}}} mod 60}}&amp;lt;!-- /* Calculate the seconds. */ --&amp;gt;&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
This template converts a value of seconds into &amp;quot;hh:mm:ss&amp;quot; format (&amp;quot;hours:minutes:seconds&amp;quot;).  Hours are only displayed if the total meets or exceeds 1 hour.&lt;br /&gt;
&lt;br /&gt;
'''Usage:'''&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ &amp;lt;/nowiki&amp;gt; format seconds | ''seconds'' }}&amp;lt;/code&amp;gt;&lt;br /&gt;
where ''seconds'' is the value of seconds to format. '''''This parameter is required.'''''  &lt;br /&gt;
&lt;br /&gt;
'''Examples:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{format seconds|121}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Yields: {{format seconds|121}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{format seconds|119}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Yields: {{format seconds|119}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{format seconds|3601}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Yields: {{format seconds|3601}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{format seconds|3599}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Yields: {{format seconds|3599}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{format seconds|7199}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Yields: {{format seconds|7199}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{format seconds|90001}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Yields: {{format seconds|90001}}&lt;br /&gt;
&lt;br /&gt;
==== See Also ====&lt;br /&gt;
*[[Help:ParserFunctions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Date and Time Formatting Templates|{{PAGENAME}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stux</name></author>	</entry>

	</feed>