Template:format seconds

From Homestar Runner Wiki

Revision as of 03:05, 2 January 2025 by Stux (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This template converts a value of seconds into "hh:mm:ss" format ("hours:minutes:seconds"). Hours are only displayed if the total meets or exceeds 1 hour.

Usage:

{{ format seconds | seconds }}

where seconds is the value of seconds to format. This parameter is required.

Examples:

{{format seconds|121}}
  • Yields: 2:01
{{format seconds|119}}
  • Yields: 1:59
{{format seconds|3601}}
  • Yields: 1:00:01
{{format seconds|3599}}
  • Yields: 59:59
{{format seconds|7199}}
  • Yields: 1:59:59
{{format seconds|90001}}
  • Yields: 25:00:01

[edit] See Also

Personal tools