PHP code example of ruslanovich111 / date-converter

1. Go to this page and download the library: Download ruslanovich111/date-converter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ruslanovich111 / date-converter example snippets




$patternStorage = new ArrayPatternStorage([
    'patterns' => [
        '($day)th ($month) ($year)',
        'The ($day)th of ($month) ($year)',
    ],
    'months' => [
        1 => ["January", "Jan\."],
        2 => ["February", "Febr\."],
        3 => ["March", "Mar\."],
        4 => ["April"],
        5 => ["May"],
        6 => ["June"],
        7 => ["July"],
        8 => ["August"],
        9 => ["September"],
        10 => ["October"],
        11 => ["November"],
        12 => ["December"]
    ],
]);