PHPackages                             org\_heigl/date-formatter - 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. org\_heigl/date-formatter

ActiveLibrary

org\_heigl/date-formatter
=========================

Extendable Library to format DateTimes using Zend-Frameworks Date-Constants

1.1.0(10y ago)3271[1 issues](https://github.com/heiglandreas/DateFormatter/issues)MITPHP

Since Mar 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/heiglandreas/DateFormatter)[ Packagist](https://packagist.org/packages/org_heigl/date-formatter)[ RSS](/packages/org-heigl-date-formatter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

DateFormatter
=============

[](#dateformatter)

[![Build Status](https://camo.githubusercontent.com/ab2f53aa1ddcc663d67accc9b2433accfe93971bf0403152eb4ef6051e73fff4/68747470733a2f2f7472617669732d63692e6f72672f686569676c616e64726561732f44617465466f726d61747465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/heiglandreas/DateFormatter)[![Code Climate](https://camo.githubusercontent.com/011f0945eda91a228fc96807e1b1ce0203ec4f086f06bb0f74781e8f966ba34b/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686569676c616e64726561732f44617465466f726d61747465722f6261646765732f6770612e737667)](https://codeclimate.com/github/heiglandreas/DateFormatter)[![Test Coverage](https://camo.githubusercontent.com/9395d9aacd105daabf9302b723f6b15b379f1f1f6c3a7d7d9172dcedb33f5cfa/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686569676c616e64726561732f44617465466f726d61747465722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/heiglandreas/DateFormatter/coverage)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d58dae4fc50d7139d10122600d99de6a5b211560ae95e8bae526f6a0cc31ea08/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f686569676c616e64726561732f44617465466f726d61747465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/heiglandreas/DateFormatter/?branch=master)

Extendable Library to format DateTimes using Zend-Frameworks Date-Constants

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

[](#installation)

`composer require org_heigl/date-formatter`

Usage
-----

[](#usage)

```
use Org_Heigl\DateFormatter\FormatterFacade as Formatter;

$date = new DateTime('2013-12-03 12:23:34', new DateTimeZone('Europe/Berlin'));

echo Formatter::format($date, 'PDF');
// Prints "20131203122334+01'00'"
```

Currently the following formatters are available:

- PDF
- ATOM
- COOKIE
- RFC\_822
- RFC\_850
- RFC\_1036
- RFC\_1123
- RFC\_3339
- RSS
- W3C
- MYSQL

Extending
---------

[](#extending)

You can add your own formatter by creating a class that implements the `Org_Heigl\DateFormatter\Formatter\FormatterInterface`. This class can then either be used directly like in this example:

```
use Org_Heigl\DateFormatter\DateFormatter as Formatter;

$formatter = new Formatter(new MyCoolClassImplementingFormatterInterface());

$date = new DateTime('2013-12-03 12:23:34', new DateTimeZone('Europe/Berlin'));

echo $formatter->format($date);
// Prints whatever you formatted the given date to ;)
```

To be able to use it with the `FormatterFacade` you have to announce the Folder containing the formatter to the class like in this example:

```
use Org_Heigl\DateFormatter\FormatterFacade as Formatter;

// Announce the Folder containing your formatter to the class
Formatter::addFormatterFolder('/absolute/Path/To/Your/Formatter/Folder');

$date = new DateTime('2013-12-03 12:23:34', new DateTimeZone('Europe/Berlin'));

echo Formatter::format($date, 'WhateverYouCalledYourFormatter');
// Prints WhateverYourFormatterDoes ;)
```

> Self-Defined formatters will always be called instead of default formatters. So when you have a formatter for "PDF" in your added folder that formatter will be called instead of the default formatter!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

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

Total

3

Last Release

3696d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ae5183aaad2bc7453230704bd6991dc6ccbcd6e775c6a29efdc94350a69f247?d=identicon)[heiglandreas](/maintainers/heiglandreas)

---

Top Contributors

[![heiglandreas](https://avatars.githubusercontent.com/u/91998?v=4)](https://github.com/heiglandreas "heiglandreas (23 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/org-heigl-date-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/org-heigl-date-formatter/health.svg)](https://phpackages.com/packages/org-heigl-date-formatter)
```

PHPackages © 2026

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