PHPackages                             druc/time-convert - 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. druc/time-convert

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

druc/time-convert
=================

Helps you convert time units and increase readability

v0.1(7y ago)017MITPHPPHP &gt;=7.0.0

Since May 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/druc/time-convert)[ Packagist](https://packagist.org/packages/druc/time-convert)[ Docs](https://github.com/druc/time-convert)[ RSS](/packages/druc-time-convert/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

TimeConvert
===========

[](#timeconvert)

A small package to help you convert time units and increase readability.

```
return TimeConvert::hours(12)->toMinutes(); // readable and meaningful

vs

return 60 * 12;
```

Install
-------

[](#install)

Via Composer

```
$ composer require druc/time-convert
```

Usage
-----

[](#usage)

```
TimeConvert::seconds(60)->toMinutes(); // 1
TimeConvert::seconds(3600)->toHours(); // 1
TimeConvert::seconds(86400)->toDays(); // 1

TimeConvert::minutes(1)->toSeconds(); // 60
TimeConvert::minutes(60)->toHours(); // 1
TimeConvert::minutes(1440)->toDays(); // 1

TimeConvert::hours(1)->toSeconds(); // 3600
TimeConvert::hours(1)->toMinutes(); // 60
TimeConvert::hours(24)->toDays(); // 1

TimeConvert::days(1)->toSeconds(); // 86400
TimeConvert::days(1)->toMinutes(); // 1440
TimeConvert::days(1)->toHours(); // 24
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2910d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37cd3eded166ea8cad3b05209c351ccca07725133d32ea608826e7652c56bac0?d=identicon)[druc](/maintainers/druc)

---

Top Contributors

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

---

Tags

packageconversiontime

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/druc-time-convert/health.svg)

```
[![Health](https://phpackages.com/badges/druc-time-convert/health.svg)](https://phpackages.com/packages/druc-time-convert)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.4k187.2M2.6k](/packages/composer-composer)[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M62](/packages/jean85-pretty-package-versions)[symfony/clock

Decouples applications from the system clock

430168.9M205](/packages/symfony-clock)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[florianv/swap

Exchange rates library for PHP

1.3k6.4M16](/packages/florianv-swap)[knplabs/knp-time-bundle

Making your dates and durations look sensible and descriptive

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

PHPackages © 2026

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