PHP code example of jakim / esolat

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

    

jakim / esolat example snippets


use Jakim\Solat\Zon;
use Jakim\Solat\Waktu;

$zones = Zon::getAllZone(); // return array

$zon = new Zon('sgr01');
echo $zon->getDescription(); // Gombak,H.Selangor,Rawang, H.Langat,Sepang,Petaling,  S.Alam
echo $zon->getNegeri(); // SELANGOR

$waktu = new Waktu($zon);

// get today waktu
$waktu->getToday(); // return array

// get weekly waktu
$waktu->getWeekly(); // return array

// get current month waktu
$waktu->getMonthly(); // return array

// get monthly waktu on October 2013
$waktu->getMonthly(10, 2013); // return array