Skip to content

Commit

Permalink
README.md and Composer.json: More tweaking for Packagist submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjoiner committed Feb 6, 2016
1 parent fd887ef commit 69e0230
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
Ordinal Number
==============

A PHP package for converting numbers to a human readable sentence of it's ordinal form eg. _'first'_, _'second'_ or even _'Three thousand five hundred sixty first'_
A PHP package for converting numbers to a human readable sentence of it's ordinal form eg. _'first'_, _'second'_ or even _'Three thousand five hundred and sixty first'_

Supports numbers in the range 1-9999.

## Usage

Recomended installation via Composer:

```
composer require martinjoiner/ordinal-number
```
See library page on Packagist https://packagist.org/packages/martinjoiner/ordinal-number

Use the OrdinalNumber class in your PHP code as follows:

```php
$ordinal = new Ordinal();
$ordinal = new OrdinalNumber( true );
// The following line will set the value or $ordinalForm to the string 'three hundred and seventy eighth'
$ordinalForm = $ordinal->convert( 378 );
```

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"type": "library",
"description": "Converts numbers to a human readable ordinal form eg. 'first', 'second' or even 'Three thousand five hundred sixty first'",
"keywords": ["ordinal", "number", "english"],
"license": "MIT",
"authors": [
{
"name": "Martin Joiner",
Expand Down

0 comments on commit 69e0230

Please sign in to comment.