Created
November 2, 2021 22:50
-
-
Save uyab/40546b2581e0e312a4352177d2934d10 to your computer and use it in GitHub Desktop.
Bug Tanggal Tua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Carbon\Carbon; | |
// Menggenerate array of months: Januari, Februari, Maret, dst | |
$months = []; | |
foreach (range(1, 12) as $monthIndex) { | |
$months[$monthIndex] = Carbon::createFromFormat('m', $monthIndex)->translatedFormat('F'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ghostvar yup, terkadang kode yang sederhana bisa lebih robust dan mudah dipahami :)