PHPackages                             headsnet/carbon-clock - 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. headsnet/carbon-clock

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

headsnet/carbon-clock
=====================

A clock interface and implementation using the Carbon date manipulation library

v0.1.1(2y ago)26.1k↑33.3%[1 issues](https://github.com/headsnet/carbon-clock/issues)MITPHPPHP &gt;8.1

Since Aug 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/headsnet/carbon-clock)[ Packagist](https://packagist.org/packages/headsnet/carbon-clock)[ RSS](/packages/headsnet-carbon-clock/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

[![Build Status](https://github.com/headsnet/carbon-clock/actions/workflows/ci.yml/badge.svg)](https://github.com/headsnet/carbon-clock/actions/workflows/ci.yml/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/b267f55854f1bb2755338d7666941b266e6992a652ef3365fa859091cf1e36b8/68747470733a2f2f706f7365722e707567782e6f72672f68656164736e65742f636172626f6e2d636c6f636b2f76)](//packagist.org/packages/headsnet/carbon-clock)[![Total Downloads](https://camo.githubusercontent.com/98c05df72891ba39a78a45c1ca801c6e26e8a99b384169765de7cf5cf2a89f87/68747470733a2f2f706f7365722e707567782e6f72672f68656164736e65742f636172626f6e2d636c6f636b2f646f776e6c6f616473)](//packagist.org/packages/headsnet/carbon-clock)[![License](https://camo.githubusercontent.com/971d6482d3f093c3089bf6e8252d886b1af36ae6a0d75c9add7b7396ebd3231d/68747470733a2f2f706f7365722e707567782e6f72672f68656164736e65742f636172626f6e2d636c6f636b2f6c6963656e7365)](//packagist.org/packages/headsnet/carbon-clock)

Carbon Clock
============

[](#carbon-clock)

A clock interface and implementation using the [Carbon](https://carbon.nesbot.com/docs/) date manipulation library.

### Usage

[](#usage)

Wherever you need access to the system time, inject a clock implementation by typehinting against the `Clock` interface.

In production environments, create a service from the `SystemClock`, and arrange for this to be injected wherever the `Clock` interface is used.

During testing, you can substitute the `FrozenClock` implementation, which will provide additional features for freezing time, and otherwise manipulating it to make testing time sensitive code much easier.

### Contributing

[](#contributing)

Contributions are welcome. Please submit pull requests with one fix/feature per pull request.

Composer scripts are configured for your convenience:

```
> composer test       # Run test suite
> composer cs         # Run coding standards checks
> composer cs-fix     # Fix coding standards violations
> composer static     # Run static analysis with Phpstan

```

### Licence

[](#licence)

This code is released under the MIT licence. Please see the LICENSE file for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

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

Every ~661 days

Total

2

Last Release

761d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2156742?v=4)[Ben Roberts](/maintainers/benr77)[@benr77](https://github.com/benr77)

---

Top Contributors

[![benr77](https://avatars.githubusercontent.com/u/2156742?v=4)](https://github.com/benr77 "benr77 (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/headsnet-carbon-clock/health.svg)

```
[![Health](https://phpackages.com/badges/headsnet-carbon-clock/health.svg)](https://phpackages.com/packages/headsnet-carbon-clock)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.3k](/packages/illuminate-support)[spatie/holidays

Calculate public holidays

402860.1k2](/packages/spatie-holidays)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k33](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

46855.5k5](/packages/pimcore-data-importer)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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