PHP code example of acurrieclark / date-string-utilities

1. Go to this page and download the library: Download acurrieclark/date-string-utilities 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/ */

    

acurrieclark / date-string-utilities example snippets




use acurrieclark\DateStringUtilities\DateInStringFinder;

$string = 'The painters said they had completed the job on 4th March 2020';

$date = DateInStringFinder::find($string);

/**
 * [
 *      'day' => 4,
 *      'month' => 3,
 *      'year' => 2020,
 *  ]
 */