PHP code example of dansoppelsa / laravel-carbon-macros

1. Go to this page and download the library: Download dansoppelsa/laravel-carbon-macros 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/ */

    

dansoppelsa / laravel-carbon-macros example snippets




use Illuminate\Support\Carbon;


$day = Carbon::parse('2020-12-25');

$day->isChristmasDay();
// true

$day->isCanadaDay();
// false

$day->isNewYearsDay();
// false