PHPackages                             navarr/periodically-advancing-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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. navarr/periodically-advancing-clock

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

navarr/periodically-advancing-clock
===================================

An implementation of PSR-20 that advances with each call

v1.0.1(7mo ago)11281MITPHPPHP ^8CI passing

Since Nov 26Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/navarr/periodically-advancing-clock)[ Packagist](https://packagist.org/packages/navarr/periodically-advancing-clock)[ GitHub Sponsors](https://github.com/navarr)[ RSS](/packages/navarr-periodically-advancing-clock/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (7)Versions (4)Used By (1)

Periodically Advancing Clock (PSR-20)
=====================================

[](#periodically-advancing-clock-psr-20)

[![Latest Stable Version](https://camo.githubusercontent.com/0e3209e6c803e94dc055e34e417011986760b2e079046671a820c999bf6bee57/687474703a2f2f706f7365722e707567782e6f72672f6e61766172722f706572696f646963616c6c792d616476616e63696e672d636c6f636b2f76)](https://packagist.org/packages/navarr/periodically-advancing-clock)[![Total Downloads](https://camo.githubusercontent.com/9470e9f0a7252e80f39e3e144933e651ec2c2539ecddeb468762d895fee1d92b/687474703a2f2f706f7365722e707567782e6f72672f6e61766172722f706572696f646963616c6c792d616476616e63696e672d636c6f636b2f646f776e6c6f616473)](https://packagist.org/packages/navarr/periodically-advancing-clock)[![Latest Unstable Version](https://camo.githubusercontent.com/98a1af23bdadbeed19c5ac1cb4f1abcd3143d5313ddd23feaf5222ba4f9c4af2/687474703a2f2f706f7365722e707567782e6f72672f6e61766172722f706572696f646963616c6c792d616476616e63696e672d636c6f636b2f762f756e737461626c65)](https://packagist.org/packages/navarr/periodically-advancing-clock)[![License](https://camo.githubusercontent.com/ab56fa26562f80805b0e298b0bc24879bfc8c86b13f8d946723c5561950f8af0/687474703a2f2f706f7365722e707567782e6f72672f6e61766172722f706572696f646963616c6c792d616476616e63696e672d636c6f636b2f6c6963656e7365)](https://packagist.org/packages/navarr/periodically-advancing-clock)
[![Tests](https://github.com/navarr/periodically-advancing-clock/actions/workflows/commit.yml/badge.svg)](https://github.com/navarr/periodically-advancing-clock/actions/workflows/commit.yml/badge.svg)[![Code Coverage](https://camo.githubusercontent.com/7d15882f83dc36733058b3d2acec8a8d8c309fe88b7c3b4d9b27b81515df97e2/68747470733a2f2f636f6465636f762e696f2f67682f6e61766172722f706572696f646963616c6c792d616476616e63696e672d636c6f636b2f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4248544b4f5a5a445233)](https://camo.githubusercontent.com/7d15882f83dc36733058b3d2acec8a8d8c309fe88b7c3b4d9b27b81515df97e2/68747470733a2f2f636f6465636f762e696f2f67682f6e61766172722f706572696f646963616c6c792d616476616e63696e672d636c6f636b2f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4248544b4f5a5a445233)[![Mutation score](https://camo.githubusercontent.com/94e85fb8b187a45739d703488ac112ad99ee92c3a2f164a913d913a22649b27d/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532466e6176617272253246706572696f646963616c6c792d616476616e63696e672d636c6f636b2532466d61696e)](https://dashboard.stryker-mutator.io/reports/github.com/navarr/periodically-advancing-clock/main)

This is an implementation of PSR-20 that provides a clock that advances one defined period with each call of `->now()`

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

[](#installation)

```
composer require navarr/periodically-advancing-clock:^1

```

Usage
-----

[](#usage)

```
use DateInterval;
use DateTimeImmutable;
use Navarr\PeriodicAdvancement\AdvancingClock;

// ...

$date = new DateTimeImmutable('2021-02-20');
$period = new DateInterval('P1M');
$clock = new AdvancingClock(startDate: $date, period: $period);

// 2021-02-20
echo $clock->now()->format('Y-m-d');

// 2021-03-20
echo $clock->now()->format('Y-m-d');
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance64

Regular maintenance activity

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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 ~1044 days

Total

2

Last Release

217d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24959115e049fb1d71612462e9106b345b3e0e6126439493514018cd440e8937?d=identicon)[navarr](/maintainers/navarr)

---

Top Contributors

[![navarr](https://avatars.githubusercontent.com/u/145128?v=4)](https://github.com/navarr "navarr (10 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/navarr-periodically-advancing-clock/health.svg)

```
[![Health](https://phpackages.com/badges/navarr-periodically-advancing-clock/health.svg)](https://phpackages.com/packages/navarr-periodically-advancing-clock)
```

###  Alternatives

[phpdocumentor/type-resolver

A PSR-5 based resolver of Class names, Types and Structural Element Names

9.2k719.5M166](/packages/phpdocumentor-type-resolver)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[league/container

A fast and intuitive dependency injection container.

86387.8M343](/packages/league-container)[stella-maris/clock

A pre-release of the proposed PSR-20 Clock-Interface

7947.5M2](/packages/stella-maris-clock)[elie29/zend-phpdi-config

PSR-11 PHP-DI autowire container configurator for Laminas, Mezzio, ZF2, ZF3 and Zend Expressive applications

20238.6k7](/packages/elie29-zend-phpdi-config)

PHPackages © 2026

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