PHPackages                             mmerlijn/helper-time-array - 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. mmerlijn/helper-time-array

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

mmerlijn/helper-time-array
==========================

TimeArray helper

v1.5(1y ago)031MITPHPPHP &gt;=8.0

Since Jan 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mmerlijn/helper-time-array)[ Packagist](https://packagist.org/packages/mmerlijn/helper-time-array)[ RSS](/packages/mmerlijn-helper-time-array/feed)WikiDiscussions master Synced 6d ago

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

Time Array Helper
=================

[](#time-array-helper)

The time array helper can handle times in array's. All times are represented as integers. Start of the day is 0 end of the day is 24\*60=1440.

Example time blok

```
[[600,660],[720,800]]
```

This represent 10:00-11:00 and 12:00-13:20

If times blocks overlap each other, the blocks will be compacted to one block

Example

```
[[600,700],[700,800]] => [[600,800]]
```

### Requirements

[](#requirements)

- PHP 8.0

### Installation

[](#installation)

```
composer require mmerlijn/helper-time-array

```

### Usage

[](#usage)

\#####Start time array

```
$t = new TimeArray();

//or with initial value

$t = new TimeArray([[500,600],[700,800]]); //multiple intervals
$t = new TimeArray([600,720]); //one interval
```

Or with the create method

```
$t = new TimeArray();
$t->create([600,700]);
```

\#####Add times (accepts only one time interval)

```
$t = $t->add([600,700]); //add 10:00-11:40
```

\#####Substract times (accepts only one time interval)

```
$t = $t->substract([650,700]); //reduce the time Array
```

\#####Get Returning the array

```
$t->get(); //
```

\#####Chaning

```
(new TimeArray([500,600]))->add([700,800])->substract([750,800])->get();
```

### Testing

[](#testing)

See phpunit tests

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

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

Every ~395 days

Total

4

Last Release

404d ago

PHP version history (2 changes)v1.1PHP ^8.0

v1.4PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/84de98c9a1803dbd730aabade43023ab14d7df77a5e71c012ecdd1150b300213?d=identicon)[mmerlijn](/maintainers/mmerlijn)

---

Top Contributors

[![mmerlijn](https://avatars.githubusercontent.com/u/8401393?v=4)](https://github.com/mmerlijn "mmerlijn (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mmerlijn-helper-time-array/health.svg)

```
[![Health](https://phpackages.com/badges/mmerlijn-helper-time-array/health.svg)](https://phpackages.com/packages/mmerlijn-helper-time-array)
```

PHPackages © 2026

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