PHPackages                             nigelhough/php-time-source - 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. nigelhough/php-time-source

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

nigelhough/php-time-source
==========================

A source of time in PHP

0.0.1(4y ago)1151MITPHPPHP ^7.3 || ^7.4 || ^8.0 || ^8.1

Since Jun 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nigelhough/php-time-source)[ Packagist](https://packagist.org/packages/nigelhough/php-time-source)[ RSS](/packages/nigelhough-php-time-source/feed)WikiDiscussions main Synced 2d ago

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

PHP Time Source
===============

[](#php-time-source)

A library to abstract the source of time data within a PHP application.

An interface is provided that can be used in classes that depend on time.

### Use Cases

[](#use-cases)

A time source makes classes more testable by having a predictable and mockable time source.

In applications that use the time source consistently you can also do powerful things with mocking dates by setting a fixed date for integration or behavioural tests or even to run a dynamic version of your application to provide a consistent demo.

### Implementation

[](#implementation)

This library comes with two implementations

- System time, where the time source is the PHP system time.
- Fixed, where the class can be instantiated with a fixed time that will always be returned.

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

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

1536d ago

### Community

Maintainers

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

---

Top Contributors

[![nigelhoughxtreme](https://avatars.githubusercontent.com/u/100714571?v=4)](https://github.com/nigelhoughxtreme "nigelhoughxtreme (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nigelhough-php-time-source/health.svg)

```
[![Health](https://phpackages.com/badges/nigelhough-php-time-source/health.svg)](https://phpackages.com/packages/nigelhough-php-time-source)
```

###  Alternatives

[itwmw/color-difference

Color difference：Din99,CIE76,CIE1994,CIEDE2000,CMC l:c

189.1k](/packages/itwmw-color-difference)

PHPackages © 2026

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