PHPackages                             fahdi/php-date-format - 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. fahdi/php-date-format

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

fahdi/php-date-format
=====================

A PHP library to convert dates to words

00PHP

Since Sep 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/fahdi/php-date-format)[ Packagist](https://packagist.org/packages/fahdi/php-date-format)[ RSS](/packages/fahdi-php-date-format/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Date to Words Converter
===========================

[](#php-date-to-words-converter)

This library provides a simple and flexible way to convert dates into word representations in PHP. It handles various date formats and offers customizable output for days, months, and years.

Features
--------

[](#features)

- Convert dates to word representations
- Support for multiple input date formats
- Handles special cases for days (1st, 2nd, 3rd, 21st, 22nd, etc.)
- Consistent word representation for years from 1 to 9999
- Extensive test suite to ensure accuracy

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- ext-intl extension

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

[](#installation)

You can install this package via Composer:

```
composer require fahdi/php-date-format
```

Usage
-----

[](#usage)

Here's a basic example of how to use the DateToWords converter:

```
