PHPackages                             danbettles/php-medjool - 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. danbettles/php-medjool

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

danbettles/php-medjool
======================

Like PHP dates, only juicier

v4.0.0(1mo ago)027↓50%ISCPHPPHP ^8.3

Since Jun 23Pushed 1mo agoCompare

[ Source](https://github.com/danbettles/php-medjool)[ Packagist](https://packagist.org/packages/danbettles/php-medjool)[ RSS](/packages/danbettles-php-medjool/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (6)Dependencies (8)Versions (7)Used By (0)

Medjool
=======

[](#medjool)

A simple extension of PHP's Date/Time module, to make working with dates and times a little smoother.

In general, I think Date/Time is actually pretty great. In some cases, though, things can feel a little clunky, so that's why Medjool is "like PHP dates, only juicier".

Overview
--------

[](#overview)

At Medjool's heart is the `Date` class, which is a Value Object—like `DateTimeImmutable`.

Of note:

- The constructor accepts a date-time string, an integer timestamp, a `DateTimeImmutable`, or a `DateTime`, so there's no need to use different methods to create an instance.
- Provides `toIsoDateString()`, `toIsoDateTimeString()`, `toMysqlDateString()`, and `toMysqlDateTimeString()` to easily format the date.
- `getComponents()` returns all/selected date and time components in an associative array; `getComponent()` returns a single, specified date/time component.
- `startOf()` and its alias, `trunc()`, returns a copy at the very start of the specified date component; `endOf()` returns a copy at the very end of the specified date component.
- `addTo()` adds to the specified date component; `subtractFrom()` subtracts from the specified date component.
- `next()` and `previous()` are shortcuts that call `addTo()` and `subtractFrom()`, respectively. `next()` adds `1` to the specified date component, whereas `previous()` subtracts `1`.
- `isInPast()` and `isInFuture()` simply read better.
- `setTimezone()` gives you the option to preserve the time.
- For convenience: `::tryFrom()` creates an instance or returns `null`; `::tryFormat()` (re)formats a date-ish or returns `null`.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance94

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Every ~2 days

Total

6

Last Release

32d ago

Major Versions

v1.1.0 → v2.0.02026-06-24

v2.0.0 → v3.0.02026-06-25

v3.1.0 → v4.0.02026-07-06

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/danbettles-php-medjool/health.svg)

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

###  Alternatives

[jeffreyvr/dropblockeditor

A simple block editor made with Livewire.

1226.8k1](/packages/jeffreyvr-dropblockeditor)

PHPackages © 2026

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