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

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

francerz/datetime-tools
=======================

Date Time Tools for PHP

v0.1.3(3y ago)0105ISCPHP

Since Mar 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/francerz/php-datetime-tools)[ Packagist](https://packagist.org/packages/francerz/datetime-tools)[ RSS](/packages/francerz-datetime-tools/feed)WikiDiscussions master Synced 1mo ago

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

Date and Time Tools
===================

[](#date-and-time-tools)

A set of PHP functions to handle date and time units.

Class `DateTimeHelper`
----------------------

[](#class-datetimehelper)

```
class DateTimeHelper
{
    public static function toDateTime($datetime): ?DateTime;

    public static function toDateTimeImmutable($datetime): ?DateTimeImmutable;

    public static function max($datetimes): ?DateTime;

    public static function min($datetimes): ?DateTime;
}
```

```
class DateIntervalHelper
{
    public static function create($y = 0, $m = 0, $d = 0, $h = 0, $i = 0, $s = 0);
}
```

Class `DateTimeRange`
---------------------

[](#class-datetimerange)

```
class DateTimeRange
{
    public function __construct($start, $end);

    public function getStart(): ?DateTime;

    public function getEnd(): ?DateTime;

    public function intersect($datetime): bool;

    public function intersectRange(DateTimeRange $range, bool $withoutLimit = false): bool;

    public function getRangeIntersect(DateTimeRange $range): DateTimeRange|null;

    public function countSeconds(): int;

    public function countWeekDays(): int[];
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

4

Last Release

1123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/630263d156ec44e1d55c3d237fe08354442d0cbe7b257032997d0a649baf1854?d=identicon)[francerz](/maintainers/francerz)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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