PHPackages                             kumatch/dateclock - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. kumatch/dateclock

ActiveLibrary[Testing &amp; Quality](/categories/testing)

kumatch/dateclock
=================

Creates current date/time, or stop.

0.1.1(12y ago)131MITPHPPHP &gt;=5.3.3

Since Aug 21Pushed 12y agoCompare

[ Source](https://github.com/kumatch/php-dateclock)[ Packagist](https://packagist.org/packages/kumatch/dateclock)[ Docs](https://github.com/kumatch/php-dateclock)[ RSS](/packages/kumatch-dateclock/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

DateClock
=========

[](#dateclock)

Creates current date/time, or stop.

Install
-------

[](#install)

Add "kumatch/dateclock" as a dependency in your project's composer.json file.

```
{
  "require": {
    "kumatch/dateclock": "*"
  }
}

```

And install your dependencies.

```
$ composer install

```

Usage
-----

[](#usage)

```
use Kumatch\DateClock\DateClock;

$clock = new DateClock();
$dateTime = $clock->now();  // Returns current DateTime object.

$clock->stop("2001-01-01 00:00:00"); // or set DateTime object
$dateTime = $clock->now();  // Returns "2001-01-01 00:00:00" DateTime object any time.

$clock->reset();
$dateTime = $clock->now();  // Returns current DateTime object.
```

License
-------

[](#license)

Licensed under the MIT License.

Copyright (c) 2013 Yosuke Kumakura

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

4649d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47afd1b8d692632cd02d8630a36844daaf9dc77befe5278c7e8452bf52f32921?d=identicon)[kumatch](/maintainers/kumatch)

---

Top Contributors

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

---

Tags

mocktimedate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kumatch-dateclock/health.svg)

```
[![Health](https://phpackages.com/badges/kumatch-dateclock/health.svg)](https://phpackages.com/packages/kumatch-dateclock)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)[phake/phake

The Phake mock testing library

4758.0M324](/packages/phake-phake)[kahlan/kahlan

The PHP Test Framework for Freedom, Truth and Justice.

1.2k1.2M247](/packages/kahlan-kahlan)[brain/monkey

Mocking utility for PHP functions and WordPress plugin API

33412.5M350](/packages/brain-monkey)

PHPackages © 2026

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