PHP code example of ebene7 / php-dateparser
1. Go to this page and download the library: Download ebene7/php-dateparser 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/ */
ebene7 / php-dateparser example snippets
use E7\DateParser\DateParser;
// Setup by yourself
$parser = DateParser();
$parser->addResolver($resolver);
// or use factory method
$parser = DateParser::create();
$result = $parser->parse($query);
use E7\DateParser\Resolver\DayResolver;
$resolver = new DayResolver();
$result = $resolver->resolve($query);