PHPackages                             steffenbrand/in-time - 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. steffenbrand/in-time

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

steffenbrand/in-time
====================

Helper to convert years, days, hours, minutes, seconds and milliseconds to smaller time units.

1.0.0(8y ago)846.5k↑460%UnlicensePHPPHP &gt;=5.6

Since Jun 28Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

InTime
======

[](#intime)

[![Build](https://camo.githubusercontent.com/acda236e6c9d83551be9269d2674271d146b4afea1d2801346565fce1dadbc26/68747470733a2f2f7472617669732d63692e6f72672f7374656666656e6272616e642f696e2d74696d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/steffenbrand/in-time)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1640abb7f9eaf06ed878a020eae12114af659a91844219fe06cdda9b0c99b138/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7374656666656e6272616e642f696e2d74696d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/steffenbrand/in-time/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/be9f60b8456830fa96ee57ddbd72ef2d4cf816ad687178bebd43928a70f2d9d5/68747470733a2f2f706f7365722e707567782e6f72672f7374656666656e6272616e642f696e2d74696d652f76657273696f6e)](https://packagist.org/packages/steffenbrand/in-time)[![Latest Unstable Version](https://camo.githubusercontent.com/40c8346d400c181d25ec84d066cbba3791540e6950c6f48cc55a762a4d11b8ee/68747470733a2f2f706f7365722e707567782e6f72672f7374656666656e6272616e642f696e2d74696d652f762f756e737461626c65)](//packagist.org/packages/steffenbrand/in-time)[![Total Downloads](https://camo.githubusercontent.com/741a2c4b23e5efde84d449ef739cab29be24e2985ff057332ce1fa91a1b6e69c/68747470733a2f2f706f7365722e707567782e6f72672f7374656666656e6272616e642f696e2d74696d652f646f776e6c6f616473)](https://packagist.org/packages/steffenbrand/in-time)[![License](https://camo.githubusercontent.com/48e8d3cddfe0dcbe37930c505aa62c4fc424c5cd68ab33724c658a8010503fa0/68747470733a2f2f706f7365722e707567782e6f72672f7374656666656e6272616e642f696e2d74696d652f6c6963656e7365)](https://github.com/steffenbrand/in-time/blob/master/LICENSE.md)[![composer.lock available](https://camo.githubusercontent.com/86f7f69ec58f73eda34b02f398067c2b67d0cfcf8f48a8905dd4ba45dffedb09/68747470733a2f2f706f7365722e707567782e6f72672f7374656666656e6272616e642f696e2d74696d652f636f6d706f7365726c6f636b)](https://github.com/steffenbrand/in-time/blob/master/composer.lock)

Helper to convert years, days, hours, minutes, seconds and milliseconds to smaller time units.

- [InTime on Packagist](https://packagist.org/packages/steffenbrand/in-time)
- [InTime on GitHub](https://github.com/steffenbrand/in-time)

How to install
--------------

[](#how-to-install)

```
composer require steffenbrand/in-time

```

How to use
----------

[](#how-to-use)

```
$a = 2 * Years::IN_DAYS; // 730
$b = 2 * Weeks::IN_DAYS; // 14
$c = 2 * Days::IN_HOURS; // 48
$d = 2 * Hours::IN_MINUTES; // 120
$e = 3 * Minutes::IN_SECONDS; // 180
$f = 2 * Seconds::IN_MILLISECONDS; // 2000
$g = 2 * Seconds::IN_MICROSECONDS; // 2000000
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3246d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c0012c84bdbe5a801bef48e509ea28f5aa0359dcba13286ff6065a298f21c49?d=identicon)[steffenbrand](/maintainers/steffenbrand)

---

Top Contributors

[![steffenbrand](https://avatars.githubusercontent.com/u/5013806?v=4)](https://github.com/steffenbrand "steffenbrand (1 commits)")

---

Tags

daysmillisecondsminutesmonthssecondstimetime-conversionweeksyearsconvertseconds

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/steffenbrand-in-time/health.svg)

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

###  Alternatives

[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[khill/php-duration

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

1611.7M20](/packages/khill-php-duration)[iamcal/php-emoji

This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.

1.3k481.1k](/packages/iamcal-php-emoji)[gabrielelana/byte-units

Library to parse, format and convert byte units

1672.2M19](/packages/gabrielelana-byte-units)[misd/linkify

Converts URLs and email addresses in text into HTML links

1122.9M10](/packages/misd-linkify)[ssnepenthe/color-utils

A PHP library for performing SASS-like color manipulations.

631.1M10](/packages/ssnepenthe-color-utils)

PHPackages © 2026

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