Skip to content
master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Mar 11, 2015

secondstohms

Craft Twig Extension for converting seconds to hours, minutes, seconds

To install simply place the secondstohms directory in your Craft plugins directory and install in the control panel

Simple Usage

{{ 307|secondsToHms }}

// Returns 05:07

Usage With Options

{{ 4000|secondsToHms({ leadingZeros: "minutes", showHours: true }) }}

// Returns 1:06:40

Options

Option Values Default Explanation
showHours true, false false Whether or not to show hours
leadingZeros hours, minutes, seconds minutes Where to start showing leading zeros

About

Craft Twig Extension for converting seconds to hours, minutes, seconds

Resources

Releases

No releases published

Packages

No packages published

Languages