PHP code example of frosya-labs / id-date-formatter

1. Go to this page and download the library: Download frosya-labs/id-date-formatter 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/ */

    

frosya-labs / id-date-formatter example snippets


use FrosyaLabs\Lang\IdDateFormatter;

$tanggal = '2016-02-17';

// Show current date, format: dd/mm/yyyy
echo IdDateFormatter::now().'<br>';

// Format $tanggal using complete format, ex:
// Rabu, 17 Februari 2016
echo IdDateFormatter::format($tanggal, IdDateFormatter::COMPLETE);