1. Go to this page and download the library: Download ojiepermana/laravel 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/ */
// Format default (tanggal bulan tahun)
tanggal_indo('2026-02-07');
// Output: 07 Februari 2026
// Dengan nama hari
tanggal_indo('2026-02-07', 'mf', true);
// Output: Jumat, 07 Februari 2026
// Dengan waktu
tanggal_indo('2026-02-07 14:30:00', 'mf', false, true);
// Output: 07 Februari 2026 : 14:30
// Format bulan pendek
tanggal_indo('2026-02-07', 'mh');
// Output: 07 Feb 2026
// Menggunakan class
use OjiePermana\Laravel\Helpers\IndonesiaHelper;
IndonesiaHelper::tanggal('2026-02-07', 'mf', true, true);
// Bulan penuh
bulan_indo('mf', 2); // Februari
// Bulan pendek
bulan_indo('mh', 2); // Feb
// Format rupiah
format_uang(1500000);
// Output: Rp 1.500.000
// Tanpa lambang
format_uang(1500000, 'ya', false);
// Output: 1.500.000
// Sembunyikan nilai
format_uang(1500000, 'tidak');
// Output: rahasia
angka_romawi(12); // XII
angka_romawi(2026); // MMXXVI
terbilang(1500000);
// Output: satu juta lima ratus ribu
terbilang(2026);
// Output: dua ribu dua puluh enam
// Jumlah hari antara dua tanggal
jumlah_hari('2026-02-01', '2026-02-28'); // 27
// Jumlah bulan antara dua tanggal
jumlah_bulan('2026-01-01', '2026-06-30'); // 5
// Minggu keberapa dalam bulan
minggu_ke_bulan('2026-02-07'); // pertama
// Hari terakhir bulan
hari_terakhir_bulan('2026-02-07'); // 2026-02-28
// Hari pertama minggu (Senin)
hari_pertama_minggu('2026-02-07'); // 2026-02-02
// Hari terakhir minggu (Minggu)
hari_terakhir_minggu('2026-02-07'); // 2026-02-08
use OjiePermana\Laravel\Helpers\IndonesiaHelper;
// Contoh penggunaan
IndonesiaHelper::tanggal('2026-02-07', 'mf', true, true);
IndonesiaHelper::uang(1500000);
IndonesiaHelper::terbilang(2026);
IndonesiaHelper::romawi(12);
IndonesiaHelper::nameday('2026-02-07');
IndonesiaHelper::jumlahHari2Tanggal('2026-02-01', '2026-02-28');
// dll.