PHP code example of gbetts / ancient-dates

1. Go to this page and download the library: Download gbetts/ancient-dates 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/ */

    

gbetts / ancient-dates example snippets


use Gbetts\AncientDates\AncientDate

$date = new AncientDate('-155000000-01-01T00:00:00Z');

$date->toBceString() // 155 million years BCE
$date->yearsAgo() // 155002025
$date->period() // Jurassic