PHPackages                             jbevanac/time-interface - 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. jbevanac/time-interface

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

jbevanac/time-interface
=======================

Simple utility library for converting between hours, minutes, and seconds.

v0.1.6(2mo ago)0713—0%MITPHPPHP &gt;=8.0

Since May 23Pushed 2mo ago1 watchersCompare

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

READMEChangelog (6)DependenciesVersions (8)Used By (0)

⏱ jbevanac/time-interface
=========================

[](#-jbevanactime-interface)

A lightweight PHP library for **precise and consistent conversion between hours, minutes, and seconds**.

This package provides a simple and strict `TimeInterface` along with concrete implementations for **Hours**, **Minutes**, and **Seconds**, making time-based calculations predictable, readable, and safe.

---

📦 Installation
--------------

[](#-installation)

```
composer require jbevanac/time-interface
```

Basic Usage
-----------

[](#basic-usage)

Creating Time Objects

```
use Jbevanac\TimeInterface\Hours;
use Jbevanac\TimeInterface\Minutes;
use Jbevanac\TimeInterface\Seconds;

$hours   = Hours::create(1.5);
$minutes = Minutes::createFromHours(1.5);
$seconds = Seconds::createFromMinutes(90);
```

Converting between Units

```
$time = Hours::create(1.5);

$time->getHours();   // 1.50
$time->getMinutes(); // 90.0
$time->getSeconds(); // 5400.0
```

📄 License
---------

[](#-license)

MIT © Jonathan Bevan

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance83

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~349 days

Recently: every ~524 days

Total

7

Last Release

88d ago

PHP version history (4 changes)0.1PHP 7.4.5

v0.1.4PHP 7.4.\*

v0.1.5PHP 8.\*

v0.1.6PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/01bdcec6e69af431c800d8a8197ab8fcd2000e46f09bbb8888fdda2fdde8c3d9?d=identicon)[jbevanac](/maintainers/jbevanac)

---

Top Contributors

[![jbevanac](https://avatars.githubusercontent.com/u/62661464?v=4)](https://github.com/jbevanac "jbevanac (14 commits)")

---

Tags

convertertimehourssecondsMinutes

### Embed Badge

![Health badge](/badges/jbevanac-time-interface/health.svg)

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

###  Alternatives

[symfony/clock

Decouples applications from the system clock

431168.9M205](/packages/symfony-clock)[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)[matthiasmullie/path-converter

Relative path converter

10229.6M7](/packages/matthiasmullie-path-converter)[data-values/geo

Geographical value objects, parsers and formatters

20631.0k18](/packages/data-values-geo)[thunderer/numbase

Convert any number between arbitrary bases

242.3k](/packages/thunderer-numbase)

PHPackages © 2026

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