PHP code example of nazir / go2hi

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

    

nazir / go2hi example snippets


go2hi::date($dateFormat, [[[$calendarType], [$timestamp]], [$language]]);

echo \go2hi\go2hi::date('d F Y'); // output sama dengan date() di php (05 February 2017)

echo \go2hi\go2hi::date('d F Y', \go2hi\go2hi::GO2HI_HIJRI); // 05 Jumadil Awal 1438

use \go2hi\go2hi;
echo go2hi::date('d F Y', go2hi::GO2HI_HIJRI, strtotime('1990-05-07')); 
// menggunakan timestamp dari strtotime() (12 Syawal 1410)

use \go2hi\go2hi;
echo go2hi::date('l k, d F Y', go2hi::GO2HI_HIJRI, strtotime('1990-05-07')); 
// hari weton (Al-Itsnayna Kliwon, 12 Syawal 1410)