PHP code example of wasinpwg / carbon-buddhist-macros
1. Go to this page and download the library: Download wasinpwg/carbon-buddhist-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/ */
wasinpwg / carbon-buddhist-macros example snippets
(new Wasinpwg\CarbonBuddhistMacros\CarbonBuddhistMacros())->register();
use Carbon\Carbon; // or use Illuminate\Support\Carbon in Laravel
echo Carbon::now()->buddhistYearFormat('d/m/Y H:i:s');
echo Carbon::now()->buddhistYearTranslatedFormat('d/m/Y H:i:s');
$carbon = Carbon::createFromBuddhistYearFormat('d/m/Y', '01/01/2567');