PHPackages                             deviscoding/arranged - 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. deviscoding/arranged

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

deviscoding/arranged
====================

PHP Library with objects for managing date formats as well as formatting and reducing date periods.

1.2.1(10mo ago)16311LGPL-2.1PHPPHP &gt;=7.0

Since Feb 7Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/jonesiscoding/arranged)[ Packagist](https://packagist.org/packages/deviscoding/arranged)[ RSS](/packages/deviscoding-arranged/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)DependenciesVersions (10)Used By (1)

Dates Arranged
==============

[](#dates-arranged)

PHP Library with objects for managing date formats and formatting for date periods.

### Formatting Functionality

[](#formatting-functionality)

Utilizing the `DevCoding\Arranged\Helper\DatePeriodFormatter::format` method, a native PHP `DatePeriod` object can be formatted using the same tokens as the `\DateTimeInterface::format` method. The end date string is modified to remove any redundant portions. For example, if the start &amp; end dates are on the same calendar day, the date is entirely removed from the end date string. For more examples, see the `format` method.

### Reduction Functionality

[](#reduction-functionality)

Utilizing the `DevCoding\Arranged\Helper\DatePeriodFormatter::reduce` method, a native PHP `DatePeriod` object can be formatted using the same tokens as the `\DateTimeInterface::format` method, then reduced in length to a specific length or as much as possible. For example, if the start or end times are at the top of the hour and a separator is included in the format string, the separator and the 00 is removed. For more examples, see the `reduce` method.

### Convenience Class

[](#convenience-class)

For convenience, the `DevCoding\Arranged\Object\DatePeriod` class extends the native PHP `DatePeriod` class with`format`and `reduce` methods that utilize the methods from `DevCoding\Arranged\Helper\DatePeriodFormatter`.

### Installation &amp; Usage

[](#installation--usage)

Installation is simple via composer `composer require deviscoding/arranged`.

Usage is simple:

```
$StartDate  = new \DateTime('2021-01-06 14:20:00')
$EndDate    = new \DateTime('2021-01-06 23:32:00');
$Interval   = new \DateInterval('PT15M');
$DatePeriod = new \DevCoding\DevCoding\Object\Date\DatePeriod($StartDate, $Interval, $EndDate);
$formatted  = $DatePeriod->format('l, F dS g:ia');
$reduced    = $DatePeriod->reduce('l, F dS g:ia', 40);
$further    = $DatePeriod->reduce('l, F dS g:ia');
echo $formatted.' OR '.$reduced.' OR '.$further;

```

The above should print *Wednesday, January 6th 2:20pm-11:30pm OR Wednesday, January 6th 2:20-11:30pm OR Wed, Jan 6th, 2:20-11:30pm*.

### Dependencies

[](#dependencies)

There are no dependencies for this library other than PHP 7+.

### Saying Thanks

[](#saying-thanks)

To be honest, simply telling a friend about this library would be thrilling. Well, that is, if I knew about it. So, maybe star the repo, mention [@jonesiscoding](https://twitter.com/jonesiscoding/) in a tweet, or drop me a line via the email address found in the source.

I enjoy coding enough that writing code can be its own reward, but writing code that no one ever sees or uses is quite boring. I'll be very glad if this little library gets some use beyond its original use case.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance54

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.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 ~155 days

Recently: every ~241 days

Total

9

Last Release

314d ago

### Community

Maintainers

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

---

Top Contributors

[![jonesiscoding](https://avatars.githubusercontent.com/u/5215554?v=4)](https://github.com/jonesiscoding "jonesiscoding (27 commits)")[![aaronj-ep](https://avatars.githubusercontent.com/u/92402786?v=4)](https://github.com/aaronj-ep "aaronj-ep (4 commits)")

---

Tags

datedateperioddatetimeformatformatterperiodphpreducetimetruncatephpdatetimeformattimedatedateperiodreducetruncateabbreviate

### Embed Badge

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

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

###  Alternatives

[league/period

Time range API for PHP

7335.4M21](/packages/league-period)[aeon-php/calendar

PHP type safe, immutable calendar library

2079.7M16](/packages/aeon-php-calendar)[kartik-v/php-date-formatter

A Javascript datetime formatting and manipulation library using PHP date-time formats.

461.5M3](/packages/kartik-v-php-date-formatter)[dater/dater

Compact PHP library for working with date/time in different formats &amp; timezones.

14282.3k](/packages/dater-dater)[zjkal/time-helper

一个简单快捷的PHP日期时间助手类库。 a smart PHP datetime helper library.

21128.6k1](/packages/zjkal-time-helper)[danielstjules/php-pretty-datetime

Generates human-readable strings for PHP DateTime objects

5791.9k](/packages/danielstjules-php-pretty-datetime)

PHPackages © 2026

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