PHPackages                             clippings/date-utils - 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. clippings/date-utils

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

clippings/date-utils
====================

Utility for date spans

0.4.0(6y ago)192.3k[1 issues](https://github.com/clippings/date-utils/issues)BSD-3-ClausePHPPHP ^7.1CI failing

Since Jun 24Pushed 6y ago26 watchersCompare

[ Source](https://github.com/clippings/date-utils)[ Packagist](https://packagist.org/packages/clippings/date-utils)[ RSS](/packages/clippings-date-utils/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

Date Utils
==========

[](#date-utils)

[![Build Status](https://camo.githubusercontent.com/57f29bd7188a92f740f316c2689f47c6fdf32f92deb3716281ab456031ef8174/68747470733a2f2f7472617669732d63692e6f72672f636c697070696e67732f646174652d7574696c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/clippings/date-utils)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3890651a7925d83992ec91862b48c577d15850382c86a884aa6fb72a5af2a2cc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636c697070696e67732f646174652d7574696c732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/clippings/date-utils/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/7392cb8f8736ba10b435e413edc2df0d630ed49a32658dc6b85ba0378b680bd8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636c697070696e67732f646174652d7574696c732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/clippings/date-utils/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/371d80ffd5e4dedbb76a0d991fb30440e3bd0d91eb7abe9993e1482730ff6501/68747470733a2f2f706f7365722e707567782e6f72672f636c697070696e67732f646174652d7574696c732f762f737461626c65)](https://packagist.org/packages/clippings/date-utils)

Utility for days and date spans

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

[](#installation)

Install via composer

```
composer require clippings/date-utils

```

Usage
-----

[](#usage)

```
$span = new DaysSpan(new Days(20), new Days(40));
$start = new DateTime('today');
$dates = $span->toDateTimeSpan($start);

echo $dates->humanize();

// For week days
$span = new WeekDaysSpan(new WeekDays(20), new WeekDays(40));
$start = new DateTime('today');
$dates = $span->toDateTimeSpan($start);

// For business with support of lists of holidays

$holidays = new Holidays([
    new DateTime(''),
    new DateTime(''),
]);

$span = new BusinessDaysSpan(new BusinessDays(20, $holidays), new BusinessDays(40, $holidays));
$start = new DateTime('today');
$dates = $span->toDateTimeSpan($start);
```

License
-------

[](#license)

Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin

Under BSD-3-Clause license, read LICENSE file.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~327 days

Total

11

Last Release

2282d ago

PHP version history (4 changes)0.2.3PHP &gt;=5.5

0.2.6PHP ^7

0.3PHP ^7.2

0.4.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4113307?v=4)[Danail Kyosev](/maintainers/dkyosev)[@dkyosev](https://github.com/dkyosev)

![](https://avatars.githubusercontent.com/u/7592650?v=4)[Evstati Zarkov](/maintainers/EZarkov)[@EZarkov](https://github.com/EZarkov)

---

Top Contributors

[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (17 commits)")[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (8 commits)")[![dkyosev](https://avatars.githubusercontent.com/u/4113307?v=4)](https://github.com/dkyosev "dkyosev (4 commits)")[![EZarkov](https://avatars.githubusercontent.com/u/7592650?v=4)](https://github.com/EZarkov "EZarkov (4 commits)")[![stanstst](https://avatars.githubusercontent.com/u/9391542?v=4)](https://github.com/stanstst "stanstst (2 commits)")[![tumbalev](https://avatars.githubusercontent.com/u/28398671?v=4)](https://github.com/tumbalev "tumbalev (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clippings-date-utils/health.svg)

```
[![Health](https://phpackages.com/badges/clippings-date-utils/health.svg)](https://phpackages.com/packages/clippings-date-utils)
```

###  Alternatives

[vinkla/hashids

A Hashids bridge for Laravel

2.1k13.3M73](/packages/vinkla-hashids)[athlon1600/youtube-downloader

PHP powered alternative for youtube-dl

922160.2k9](/packages/athlon1600-youtube-downloader)[tig/postnl-magento2

TIG Magento 2 PostNL extension

58544.2k4](/packages/tig-postnl-magento2)[zxing/qr-reader

PHP qr code reader library

7542.7k1](/packages/zxing-qr-reader)[rpnzl/arrch

Array queries for PHP 5.3

37134.6k2](/packages/rpnzl-arrch)[krayin/krayin-package-generator

Krayin Package Generator

2196.7k2](/packages/krayin-krayin-package-generator)

PHPackages © 2026

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