PHPackages                             jaroslavlibal/datetime - 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. jaroslavlibal/datetime

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

jaroslavlibal/datetime
======================

DateTime helpers

0.1(8y ago)027MITPHPPHP ^7.0

Since Jul 8Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

DateTime
========

[](#datetime)

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

[](#installation)

Install package [`jaroslavlibal/datetime`](https://packagist.org/packages/jaroslavlibal/datetime) with [Composer](https://getcomposer.org/) and register the parts you need as the services.

```
composer require jaroslavlibal/datetime

```

Factory
-------

[](#factory)

Retrieve the DateTime and DateTimeImmutable objects from the mockable and testable factory instead of direct `new \DateTime()` creation.

### Usage

[](#usage)

```
class Foo
{

   use JaroslavLibal\DateTime\Factory\DateTimeFactory;
   use JaroslavLibal\DateTime\Factory\DateTimeFactory;

   private DateTimeFactory;
   private DateTimeImmutableFactory;

   public function __construct(DateTimeFactory $dateTimeFactory, DateTimeImmutableFactory $dateTimeImmutableFactory)

   private function bar() {
      $dateTimeFactory->create();
      $dateTimeImmutableFactory->create();
   }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

3233d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aad10a8761fccb32fa3b14aec0e0aab778f465498fa2af37738a616767dc7641?d=identicon)[jaroslavlibal](/maintainers/jaroslavlibal)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/jaroslavlibal-datetime/health.svg)

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

###  Alternatives

[whichbrowser/parser

Useragent sniffing library for PHP

1.8k11.6M50](/packages/whichbrowser-parser)[tm/tooly-composer-script

Simple composer script to manage phar files.

103280.1k32](/packages/tm-tooly-composer-script)[joetannenbaum/mr-clean

23044.5k](/packages/joetannenbaum-mr-clean)[winter/wn-blog-plugin

Blog plugin for Winter CMS

2042.1k3](/packages/winter-wn-blog-plugin)

PHPackages © 2026

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