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

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

ministryofjustice/date-utils
============================

Utility classes for working day and bank holiday calculations

1.2.2(5y ago)649.6k4[2 PRs](https://github.com/ministryofjustice/date-utils/pulls)PHPPHP &gt;=5.4

Since Jun 9Pushed 4y ago11 watchersCompare

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

READMEChangelog (8)Dependencies (1)Versions (13)Used By (0)

**This repository is archived and no longer maintained. Instead, we recommend using [Carbon](https://packagist.org/packages/nesbot/carbon) with the [business-day mixin](https://packagist.org/packages/cmixin/business-day) which supports all of the functionality of the date-utils library, but with a better API.**

---

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

[](#date-utils)

[![Build Status](https://camo.githubusercontent.com/ddfb183b53895ab1968d41483de92cbfb0d138d54557f1a9b6119a4c81490682/68747470733a2f2f7472617669732d63692e6f72672f6d696e69737472796f666a7573746963652f646174652d7574696c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ministryofjustice/date-utils)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0ae85481ec9cf0b2d5892ee214e66a6ca8eed5390c24d32032b1afecfdc124a2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d696e69737472796f666a7573746963652f646174652d7574696c732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ministryofjustice/date-utils/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/c54f91b90fd392daf77dcc63ec3ae71437a1b5732f5381ac294ea5dffeeeb48d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d696e69737472796f666a7573746963652f646174652d7574696c732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ministryofjustice/date-utils/?branch=master)[![Build Status](https://camo.githubusercontent.com/b21a0e29794e1a649df4b27902acb95e9301b8006a9f69106790a49d0a47a71c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d696e69737472796f666a7573746963652f646174652d7574696c732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ministryofjustice/date-utils/build-status/master)

Allows for the easy calculation of working days between two points. Automatically generates UK bank holidays, these can be overridden via config

Basic example

```
$date = WorkingDays::workingDaysFrom(new \DateTime('2014-01-01'), 1);

//$date will be set to 2014-01-02 which is the next working day
```

### Tests

[](#tests)

Build container so we can run PHP 5.4

```
docker-compose --project-name moj-date-utils build test

```

Run unit tests

```
docker-compose --project-name moj-date-utils run test

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 60.5% 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 ~287 days

Recently: every ~484 days

Total

9

Last Release

2060d ago

Major Versions

0.4.0 → 1.0.02015-06-04

### Community

Maintainers

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

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

![](https://avatars.githubusercontent.com/u/1422984?v=4)[Ali Bahman](/maintainers/webit4me)[@webit4me](https://github.com/webit4me)

---

Top Contributors

[![brettminnie](https://avatars.githubusercontent.com/u/6124248?v=4)](https://github.com/brettminnie "brettminnie (46 commits)")[![knasher](https://avatars.githubusercontent.com/u/1300648?v=4)](https://github.com/knasher "knasher (18 commits)")[![eddiejaoude](https://avatars.githubusercontent.com/u/624760?v=4)](https://github.com/eddiejaoude "eddiejaoude (7 commits)")[![gregtyler](https://avatars.githubusercontent.com/u/100852?v=4)](https://github.com/gregtyler "gregtyler (2 commits)")[![jeremyquinton](https://avatars.githubusercontent.com/u/1847770?v=4)](https://github.com/jeremyquinton "jeremyquinton (2 commits)")[![PaulVM](https://avatars.githubusercontent.com/u/3284594?v=4)](https://github.com/PaulVM "PaulVM (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-collection-macros

A set of useful Laravel collection macros

1.9k5.7M29](/packages/spatie-laravel-collection-macros)[payum/iso4217

ISO 4217 PHP Library

16312.1M5](/packages/payum-iso4217)[nativephp/desktop

NativePHP for Desktop

34020.6k3](/packages/nativephp-desktop)[sebastianfeldmann/camino

Path management the OO way

176.4M1](/packages/sebastianfeldmann-camino)

PHPackages © 2026

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