PHPackages                             closestdate/closestdate - 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. closestdate/closestdate

ActiveLibrary

closestdate/closestdate
=======================

Utility class for find the closest date in PHP 5.3+

1.1.0(13y ago)636MITPHP

Since May 1Pushed 11y ago2 watchersCompare

[ Source](https://github.com/lordoffreaks/ClosestDate)[ Packagist](https://packagist.org/packages/closestdate/closestdate)[ Docs](http://github.com/lordoffreaks/ClosestDate)[ RSS](/packages/closestdate-closestdate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

ClosestDate
===========

[](#closestdate)

[![Join the chat at https://gitter.im/lordoffreaks/ClosestDate](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/lordoffreaks/ClosestDate?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

PHP utility class for getting the nearest date among an array of dates.

\##Features##

- Suppor for custom dates (not just "today".
- Support for prevalence on past dates or future dates.

[![Build Status](https://camo.githubusercontent.com/e20cdb4cabae8891c761b1b74c364259130c2aa0421d3b9dd718c160d346d455/68747470733a2f2f6170692e7472617669732d63692e6f72672f6c6f72646f66667265616b732f436c6f73657374446174652e706e67)](https://api.travis-ci.org/lordoffreaks/ClosestDate)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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

4757d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43fc8bd773f78a9dc92c563688049de72f794cbf312d56ce8219a3d0262db0ca?d=identicon)[lord\_of\_freaks](/maintainers/lord_of_freaks)

---

Top Contributors

[![lordoffreaks](https://avatars.githubusercontent.com/u/953337?v=4)](https://github.com/lordoffreaks "lordoffreaks (16 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

dateclosest

### Embed Badge

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

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

###  Alternatives

[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k11.4M25](/packages/azuyalabs-yasumi)[carbonphp/carbon-doctrine-types

Types to use Carbon in Doctrine

213220.4M8](/packages/carbonphp-carbon-doctrine-types)[rlanvin/php-rrule

Lightweight and fast recurrence rules for PHP (RFC 5545)

69810.6M39](/packages/rlanvin-php-rrule)[aeon-php/calendar

PHP type safe, immutable calendar library

2079.7M16](/packages/aeon-php-calendar)

PHPackages © 2026

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