PHPackages                             labrodev/time-converter - 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. labrodev/time-converter

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

labrodev/time-converter
=======================

Utility library that provides a lightweight method to calculate the great-circle distance between two geographic coordinates using the Haversine formula.

v1.0.0(1y ago)00MITPHPPHP &gt;=8.1

Since Jun 29Pushed 1y agoCompare

[ Source](https://github.com/labrodev/time-converter)[ Packagist](https://packagist.org/packages/labrodev/time-converter)[ Docs](https://github.com/labrodev/time-converter)[ RSS](/packages/labrodev-time-converter/feed)WikiDiscussions main Synced today

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

PHP Time Converter
==================

[](#php-time-converter)

**Labrodev\\TimeConverter** is a strict PHP 8.1+ utility library that provides static helper methods to convert between seconds, minutes, and hours — built for simplicity and performance.

Features
--------

[](#features)

- Convert seconds to minutes
- Convert hours and minutes into raw minute count
- Convert float-based minutes into integer format
- Convert hours (as float) into total minutes
- Fully static and type-safe class
- Lightweight, dependency-free implementation
- Includes PHPUnit and PHPStan support for testing and analysis

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

[](#installation)

```
composer require labrodev/time-converter

```

Usage
-----

[](#usage)

```
use Labrodev\TimeConverter\Converter;

// Convert seconds to minutes
Converter::secondsToMinutes(180); // 3.0

// Convert hours and minutes to raw minutes
Converter::timeToRawMinutes(2, 30); // 150

// Convert float minutes to integer
Converter::floatMinutesToInt(12.7); // 13

// Convert hours to minutes
Converter::hoursToMinutes(1.5); // 90
```

Testing
-------

[](#testing)

To run tests:

```
composer install
composer test

```

Static Analysis
---------------

[](#static-analysis)

To run static analysis using PHPStan:

```
composer install
composer analyse

```

> Configuration is located in `phpstan.neon.dist`

Security
--------

[](#security)

If you discover a security vulnerability within this package, **please contact us immediately at **. All security-related issues will be handled privately and promptly.

Credits
-------

[](#credits)

This package is maintained by **Labrodev** — Laravel &amp; PHP development studio.

Feedback
--------

[](#feedback)

If you have any questions, suggestions, or have found an error — feel free to open an issue or contact us:
****

**License:** MIT

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance49

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

369d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/151143718?v=4)[Lashyn Petro ](/maintainers/labrodev)[@labrodev](https://github.com/labrodev)

---

Tags

composer-librarycomposer-packagedatetimelabrodevphpphp-converterphp-libraryphp-packagephp-timephp-utilityphp-utilsphp8time-converterphphelperutilitystatichaversinelabrodevdistance-calculatorlatitude-longitude

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/labrodev-time-converter/health.svg)

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

###  Alternatives

[zjkal/time-helper

一个简单快捷的PHP日期时间助手类库。 a smart PHP datetime helper library.

21031.3k2](/packages/zjkal-time-helper)

PHPackages © 2026

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