PHPackages                             joomla/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. [Framework](/categories/framework)
4. /
5. joomla/datetime

Abandoned → [nesbot/carbon](/?search=nesbot%2Fcarbon)ArchivedJoomla-package[Framework](/categories/framework)

joomla/datetime
===============

Joomla DateTime Package

2.0.0(11y ago)31.6k1[2 issues](https://github.com/joomla-framework/datetime/issues)[1 PRs](https://github.com/joomla-framework/datetime/pulls)LGPL-2.1+PHPPHP &gt;=5.3.10

Since Sep 18Pushed 8y ago7 watchersCompare

[ Source](https://github.com/joomla-framework/datetime)[ Packagist](https://packagist.org/packages/joomla/datetime)[ Docs](https://github.com/joomla-framework/datetime)[ RSS](/packages/joomla-datetime/feed)WikiDiscussions master Synced 3w ago

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

The DateTime Package
====================

[](#the-datetime-package)

[![Build Status](https://camo.githubusercontent.com/31b928c600ecd2a69d6d999542e335c33f887874e93c97ef6da7c83992de489b/68747470733a2f2f7472617669732d63692e6f72672f6a6f6f6d6c612d6672616d65776f726b2f6461746574696d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/joomla-framework/datetime) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/5eff5fcb84893b9df97d5bc1496074a52a31776d2da4658fa6ed680f9a38b9c8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f6f6d6c612d6672616d65776f726b2f6461746574696d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/joomla-framework/datetime/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/0b72c0c9d2b3c52405d6743187891ed3fb48752cee20795a186ea11dd95a4f20/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f6f6d6c612d6672616d65776f726b2f6461746574696d652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/joomla-framework/datetime/?branch=master)

[![Latest Stable Version](https://camo.githubusercontent.com/1dd9216e81850058db4e30364f5444c4adecea4aedae5dc232b843854ff168cc/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6461746574696d652f762f737461626c65)](https://packagist.org/packages/joomla/datetime)[![Total Downloads](https://camo.githubusercontent.com/6f9d5030d3ecdfccfa781b9ce509930bcd8c4301ceea677b409ba3b18f72e9e6/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6461746574696d652f646f776e6c6f616473)](https://packagist.org/packages/joomla/datetime)[![Latest Unstable Version](https://camo.githubusercontent.com/1732a4048dc6b2c51cbdd762df02c60c77be5c14da8514d5ca00053f09669c3e/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6461746574696d652f762f756e737461626c65)](https://packagist.org/packages/joomla/datetime)[![License](https://camo.githubusercontent.com/61cc28eba4ca3f87e34a3fbc73d70eb90be2a437997753608b4d10cc8b53e574/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6461746574696d652f6c6963656e7365)](https://packagist.org/packages/joomla/datetime)

This is a DateTime package built for the Joomla! Framework during Google Summer of Code 2014. The main goal for this library was to create a DateTime object as an [Immutable Value Object](http://magazine.joomla.org/issues/issue-july-2014/item/2111-the-value-of-value-objects).

Immutability
------------

[](#immutability)

If you know how to use PHP `DateTime` object then you know almost everything about that package. Before you start using it you need to know one more thing - this `DateTime` is immutable. To explain what immutability means let's take a look at an example:

```
$start = new DateTime('2014-08-24');
$end = $start->addDays(2);

echo $start->format('Y-m-d');  // 2014-08-24
echo $end->format('Y-m-d');    // 2014-08-26
```

Every method of `DateTime` is returning a new object and is not changing the current one. That's the most important thing what you have to know.

Usage
-----

[](#usage)

- [Date &amp; DateTime](doc/date-and-datetime.md)
- [DateRange &amp; DateTimeRange](doc/daterange-and-datetimerange.md)
- [DateInterval](doc/dateinterval.md)
- [GetterInterface](doc/getter.md)
- [ParserInterface](doc/parser.md)
- [SinceInterface](doc/since.md)
- [AbstractTranslator](doc/translator.md)
- [StrategyInterface](doc/strategy.md)

Credits
-------

[](#credits)

[Jens Segers](http://github.com/jenssegers/laravel-date) for their approach to translations

Installation via Composer
-------------------------

[](#installation-via-composer)

Add `"joomla/datetime": "~2.0"` to the require block in your composer.json and then run `composer install`.

```
{
	"require": {
		"joomla/datetime": "~2.0"
	}
}
```

Alternatively, you can simply run the following from the command line:

```
composer require joomla/date "~2.0"
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.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

Unknown

Total

1

Last Release

4296d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/305a2164440014dcef9ac681c139fe5e8a1ce1d7a8c3b3cfb828497729a4c70e?d=identicon)[wilsonge](/maintainers/wilsonge)

![](https://avatars.githubusercontent.com/u/42966168?v=4)[Release-Joomla](/maintainers/release-joomla)[@release-joomla](https://github.com/release-joomla)

---

Top Contributors

[![tomaszhanc](https://avatars.githubusercontent.com/u/7013293?v=4)](https://github.com/tomaszhanc "tomaszhanc (119 commits)")[![mbabker](https://avatars.githubusercontent.com/u/368545?v=4)](https://github.com/mbabker "mbabker (37 commits)")[![wilsonge](https://avatars.githubusercontent.com/u/1986000?v=4)](https://github.com/wilsonge "wilsonge (5 commits)")[![asika32764](https://avatars.githubusercontent.com/u/1639206?v=4)](https://github.com/asika32764 "asika32764 (3 commits)")[![photodude](https://avatars.githubusercontent.com/u/10253980?v=4)](https://github.com/photodude "photodude (1 commits)")

---

Tags

frameworkdatetimejoomla

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7223.7M2.7k](/packages/silverstripe-framework)[joomla/filter

Joomla Filter Package

151.5M10](/packages/joomla-filter)[joomla/application

Joomla Application Package

23430.4k13](/packages/joomla-application)[joomla/registry

Joomla Registry Package

16505.8k21](/packages/joomla-registry)[joomla/filesystem

Joomla Filesystem Package

11394.8k7](/packages/joomla-filesystem)

PHPackages © 2026

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