PHPackages                             alfian/indo-date-format - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. alfian/indo-date-format

ActiveLibrary

alfian/indo-date-format
=======================

Format tanggal Indonesia untuk Laravel

v1.0.0(10mo ago)01PHPPHP ^8.0

Since Jun 19Pushed 10mo agoCompare

[ Source](https://github.com/alfianm/Indo-Date-Format)[ Packagist](https://packagist.org/packages/alfian/indo-date-format)[ RSS](/packages/alfian-indo-date-format/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

indo-date-format
================

[](#indo-date-format)

[![Packagist Version](https://camo.githubusercontent.com/04a258b1f28a1b73a9c5c1d06aae91b7edb13e6f3ac7f3bf0b164d19214053c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6669616e2f696e646f2d646174652d666f726d61742e737667)](https://packagist.org/packages/alfian/indo-date-format)[![License](https://camo.githubusercontent.com/1eaed81cb4a58cea7fb3e3f80d040eb4aa928ee79302741829ebf913e86f959c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c6669616e2f696e646f2d646174652d666f726d61742e737667)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/5ecac6c86a65fdb294d0c01f7a029723eb03cae50782276cb54926e5aaa7c688/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c6669616e2f696e646f2d646174652d666f726d61742e737667)](https://www.php.net)

**Format tanggal Indonesia untuk Laravel**

> Mengubah tanggal dari format `dd/mm/YYYY` menjadi format `DD MMMM YYYY` (misalnya `01/01/2025` → `01 Januari 2025`) dalam aplikasi Laravel.

---

📋 Daftar Isi
------------

[](#-daftar-isi)

- [Fitur](#-fitur)
- [Instalasi](#-instalasi)
- [Penggunaan](#-penggunaan)
    - [1. Kelas Langsung](#1-kelas-langsung)
    - [2. Helper Function](#2-helper-function)
- [Konfigurasi (Opsional)](#-konfigurasi-opsional)
- [Contributing](#contributing)
- [Lisensi](#lisensi)

---

🚀 Fitur
-------

[](#-fitur)

- Konversi tanggal `dd/mm/YYYY` ke format `DD MMMM YYYY` berbahasa Indonesia.
- Autodiscoverable di Laravel 5.5+.
- Dukungan PHP 7.4, 8.0 ke atas.

---

🔧 Instalasi
-----------

[](#-instalasi)

1. **Via Packagist**

    ```
    composer require alfian/indo-date-format
    ```
2. **Via Path Repository** (local development)

    - Tambahkan di `composer.json` proyek: ```
        "repositories": [
          {
            "type": "path",
            "url": "./packages/alfian/indo-date-format"
          }
        ]
        ```
    - Jalankan: ```
        composer require alfian/indo-date-format:dev-main
        ```
3. **(Opsional)** Jika Laravel tidak auto-discover, tambahkan di `config/app.php`:

    ```
    'providers' => [
        // ...
        Alfian\IndoDateFormat\IndoDateServiceProvider::class,
    ],
    ```

---

📖 Penggunaan
------------

[](#-penggunaan)

### 1. Kelas Langsung

[](#1-kelas-langsung)

```
use Alfian\IndoDateFormat\IndoDate;

echo IndoDate::format('01/01/2025');
// => 01 Januari 2025
```

### 2. Helper Function

[](#2-helper-function)

> Pastikan kamu menambahkan `src/helpers.php` dan mengautoload file tersebut di `composer.json`:

```
// src/helpers.php
if (! function_exists('indo_date')) {
    function indo_date(string $tanggal): ?string
    {
        return Alfian\IndoDateFormat\IndoDate::format($tanggal);
    }
}
```

```
"autoload": {
    "psr-4": {
        "Alfian\\IndoDateFormat\\": "src/"
    },
    "files": [
       "src/helpers.php"
    ]
}
```

```
composer dump-autoload
```

```
// Gunakan di mana saja
echo indo_date('15/08/2025');
// => 15 Agustus 2025
```

---

⚙️ Konfigurasi (Opsional)
-------------------------

[](#️-konfigurasi-opsional)

Kamu bisa extend kelas dasar untuk kebutuhan khusus:

```
namespace App\Services;

use Alfian\IndoDateFormat\IndoDate as BaseIndoDate;

class CustomDate extends BaseIndoDate
{
    public static function formatWithDash(string $tanggal)
    {
        return parent::format($tanggal, '-');
    }
}
```

---

🤝 Contributing
--------------

[](#-contributing)

1. Fork repository ini
2. Buat branch fitur: `git checkout -b feature/nama-fitur`
3. Commit perubahan: `git commit -m 'Menambahkan fitur baru'`
4. Push ke remote: `git push origin feature/nama-fitur`
5. Buka Pull Request

---

📄 Lisensi
---------

[](#-lisensi)

MIT © \[Alfian Maulana\]

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance56

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

324d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2ba4bb8ff1a2a6e6f36bbc4ba587cb86a34b3ec0bf8cf1ed4af7bfca9f2fa86?d=identicon)[alfianm](/maintainers/alfianm)

---

Top Contributors

[![apin1411](https://avatars.githubusercontent.com/u/50357438?v=4)](https://github.com/apin1411 "apin1411 (3 commits)")

### Embed Badge

![Health badge](/badges/alfian-indo-date-format/health.svg)

```
[![Health](https://phpackages.com/badges/alfian-indo-date-format/health.svg)](https://phpackages.com/packages/alfian-indo-date-format)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
