PHPackages                             xpl/datetime - 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. xpl/datetime

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

xpl/datetime
============

Enhancements to Date and Time Extension shipped with PHP

1.0.1(7y ago)1183MITPHPPHP &gt;=7.1.0

Since Dec 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ocubom/Xpl-DateTime)[ Packagist](https://packagist.org/packages/xpl/datetime)[ Docs](http://github.com/ocubom/xpl-datetime)[ RSS](/packages/xpl-datetime/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

XPL DateTime
============

[](#xpl-datetime)

*XPL DateTime* component attempts to improve the [Date and Time Extension](http://php.net/manual/refs.calendar.php "PHP Date and Time Related Extensions")shipped with PHP. It adds some enhancements while is almost fully compatible with the default extension. It is also more [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601 "Data elements and interchange formats – Information interchange – Representation of dates and times (Wikipedia)") compilant.

LicenseVersionStatusSensioLabsInsight[![License](https://camo.githubusercontent.com/0fbc79ea11059416190cb46c02a3a5eff4e8f1f6ffd32a17a312582633a4dac6/68747470733a2f2f706f7365722e707567782e6f72672f78706c2f6461746574696d652f6c6963656e73652e737667)](http://github.com/ocubom/Xpl-DateTime/blob/master/LICENSE "XPL DateTime license file")[![Latest Unstable Version](https://camo.githubusercontent.com/5cfc2b3d7fb331194e0063c88302215cea373b01ffc82c235c2186c8601e8db2/68747470733a2f2f706f7365722e707567782e6f72672f78706c2f6461746574696d652f762f756e737461626c652e706e67)](https://packagist.org/packages/xpl/datetime)[![Build Status](https://camo.githubusercontent.com/e7aa874e6b92757d8850f1c2ce8098f36dbc1d03f6a5a2e21ea1a0aa4b2e012c/68747470733a2f2f7472617669732d63692e6f72672f6f6375626f6d2f58706c2d4461746554696d652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ocubom/Xpl-DateTime) [![Coverage Status](https://camo.githubusercontent.com/6203e70b4177336501bbc12627b779b79d2d7f83274017aeb07e44fb48dc8a06/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6f6375626f6d2f58706c2d4461746554696d652f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/ocubom/Xpl-DateTime)[![SensioLabsInsight](https://camo.githubusercontent.com/ee2dc99f61e36083587d8f8b36a68a49c2f60aeb3b19c56e84064336119bcaa1/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62306139613166612d653637362d343438342d383065632d3631333832663236373465622f6269672e706e67)](https://insight.sensiolabs.com/projects/b0a9a1fa-e676-4484-80ec-61382f2674eb)Documentation
-------------

[](#documentation)

The component may be 100% compatible with standard [Date and Time Extension](http://php.net/manual/refs.calendar.php "PHP Date and Time Related Extensions")classes but the names used are based on [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601 "Data elements and interchange formats – Information interchange – Representation of dates and times (Wikipedia)").

To replace the original PHP implementation with this component, include the following PHP snippet:

```
use Xpl\DateTime\DateTime as DateTime;
use Xpl\DateTime\DateTimeImmutable as DateTimeImmutable;
use Xpl\DateTime\DateTimeInterface as DateTimeInterface;
use Xpl\DateTime\Duration as DateInterval;
use Xpl\DateTime\TimeZone as DateTimeZone;
```

Just use like the standard PHP extension classes.

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

[](#installation)

Just use [composer](http://getcomposer.org/ "Composer Dependency Manager for PHP") to add the dependency:

```
composer require xpl/datetime:dev-master

```

Or add the dependecy manually:

1. Update `composer.json` file with the lines:

    ```
    {
        "require": {
            "xpl/datetime": "dev-master"
        }
    }

    ```
2. And update the dependencies:

    ```
    composer update xpl/datetime

    ```

Authorship
----------

[](#authorship)

Current maintainer:

- [Oscar Cubo Medina](http://github.com/ocubom/ "@ocubom projects"). Twitter: [@ocubom](http://twitter.com/ocubom/ "@ocubom on twitter").

This component starts as an utility class used on an internal project. This is a fork of the idea rewrited from scratch.

Copyright and License
---------------------

[](#copyright-and-license)

*XPL DateTime* is licensed under the MIT License – see the [`LICENSE`](http://github.com/ocubom/Xpl-DateTime/blob/master/LICENSE "XPL DateTime license file") file for details.

If you did not receive a copy of the license, contact with the author.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

3

Last Release

2812d ago

Major Versions

0.0 → 1.0.02015-01-11

PHP version history (3 changes)0.0PHP &gt;=5.3.3

1.0.0PHP &gt;=5.3.6

1.0.1PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/642ac779b1c36bfa6dfae27c756efcf88f75ff34fd50b376a72acb05e845502d?d=identicon)[ocubom](/maintainers/ocubom)

---

Top Contributors

[![ocubom](https://avatars.githubusercontent.com/u/184187?v=4)](https://github.com/ocubom "ocubom (27 commits)")

---

Tags

clockdatetimetimedatecalendar

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)[brick/date-time

Date and time library

3623.3M61](/packages/brick-date-time)[tplaner/when

Date/Calendar recursion library.

5261.0M5](/packages/tplaner-when)[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)[icecave/chrono

A date &amp; time library that is decoupled from the system clock.

54188.9k7](/packages/icecave-chrono)

PHPackages © 2026

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