PHP code example of sm-alfariz / indonesian-date-format
1. Go to this page and download the library: Download sm-alfariz/indonesian-date-format 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/ */
sm-alfariz / indonesian-date-format example snippets
endi\IndonesianDate\IndonesiaDate;
$tgl = new IndonesiaDate;
echo $tgl->blogDate(date("Y-m-d")); //echo blog date style in indonosian format
$time = date('2016-08-22 21:25:43');
echo $tgl->humanDifSimple($time); //result " 4 hari "
echo $tgl->humanDif($time); //result " 3 hari 3 jam 54 menit yang lalu "