PHPackages                             filmtools/secondstominutes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. filmtools/secondstominutes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

filmtools/secondstominutes
==========================

Formats seconds to 'mm:ss' or 'hh:mm:ss'

1.0.1(7y ago)027MITPHP

Since Apr 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/filmtools/secondstominutes)[ Packagist](https://packagist.org/packages/filmtools/secondstominutes)[ RSS](/packages/filmtools-secondstominutes/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (4)Used By (0)

FilmTools · seconds2minutes
===========================

[](#filmtools--seconds2minutes)

**Formats seconds to 'mm:ss' or 'hh:mm:ss'**

[![Build Status](https://camo.githubusercontent.com/0614091b72f540858ae41e91965c8f650807e7aec53ee9f821f5822f7440db96/68747470733a2f2f7472617669732d63692e6f72672f66696c6d746f6f6c732f7365636f6e6473746f6d696e757465732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/filmtools/secondstominutes)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5af799811b2a0d4e6141709aacce1b5ad9143cb23f8b5d041bbaa7aca2c870c8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66696c6d746f6f6c732f7365636f6e6473746f6d696e757465732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/filmtools/secondstominutes/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/b5a3290225ebbe10a02436175e8a788951946f4ff811a480fec6609a951ad820/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66696c6d746f6f6c732f7365636f6e6473746f6d696e757465732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/filmtools/secondstominutes/?branch=master)[![Build Status](https://camo.githubusercontent.com/99b8316fda4fc0e974a81de6abb1cbc55016f8a43c90574f77f8c71b709b11a4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66696c6d746f6f6c732f7365636f6e6473746f6d696e757465732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/filmtools/secondstominutes/build-status/master)

Installation
------------

[](#installation)

```
$ composer require filmtools/secondstominutes
```

Usage
-----

[](#usage)

The **seconds2minutes** function is namespaced, so you will have to mention it in your `use` statements. The callable class **SecondsToMinutes** is a wrapper around the function; It can be used as [Twig Filter](https://twig.symfony.com/doc/2.x/advanced.html#filters).

```
use function FilmTools\SecondsToMinutes\seconds2minutes;
use FilmTools\SecondsToMinutes\SecondsToMinutes;

echo seconds2minutes( 3900 ); // "01:05:00"

$formatter = new SecondsToMinutes;
echo $formatter( 90 ); // "01:30"

$filter = new \Twig\TwigFilter('secondstominutes', new SecondsToMinutes);
$twig->addFilter( $filter );
```

Development and Unit testing
----------------------------

[](#development-and-unit-testing)

```
$ git clone https://github.com/filmtools/secondstominutes.git
$ cd secondstominutes
$ composer install

# either, or, and:
$ composer phpunit
$ vendor/bin/phpunit
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2574d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e63cf288fc222f7cceb1fc40630b10fff87288d235571c0803a70348cc9ebac4?d=identicon)[tomkyle](/maintainers/tomkyle)

---

Top Contributors

[![tomkyle](https://avatars.githubusercontent.com/u/412560?v=4)](https://github.com/tomkyle "tomkyle (5 commits)")

---

Tags

timesecondsMinutes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/filmtools-secondstominutes/health.svg)

```
[![Health](https://phpackages.com/badges/filmtools-secondstominutes/health.svg)](https://phpackages.com/packages/filmtools-secondstominutes)
```

###  Alternatives

[symfony/clock

Decouples applications from the system clock

430168.9M205](/packages/symfony-clock)[knplabs/knp-time-bundle

Making your dates and durations look sensible and descriptive

6308.9M39](/packages/knplabs-knp-time-bundle)[league/period

Time range API for PHP

7335.4M21](/packages/league-period)[mtownsend/read-time

A PHP package to show users how long it takes to read content.

283571.1k2](/packages/mtownsend-read-time)[khill/php-duration

Converts between colon formatted time, human-readable time and seconds

1611.7M20](/packages/khill-php-duration)[brick/date-time

Date and time library

3623.3M61](/packages/brick-date-time)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
