i want change name day in Indonesia language
Sunday -> Minggu - 0
Monday -> Senin - 1
Tuesday -> Selasa - 2
Wednesday -> Rabu - 3
Thursday -> Kamis - 4
Friday -> Jum'at - 5
Saturday -> Sabtu - 6
<?php
date_default_timezone_set("Asia/Jakarta");
$date = date("Y-m-d"); // date now - example :2016-02-07
$date_day_substr = substr($date, 9, 2); // date day now - example : 7
$date_indonesia = date('w', $date_day_substr);
switch($date_indonesia){
case 0 : {
$date_indonesia ='Minggu'; //Sunday
}break;
case 1 : {
$date_indonesia ='Senin'; // Monday
}break;
case 2 : {
$date_indonesia ='Selasa'; //Tuesday
}break;
case 3 : {
$date_indonesia ='Rabu'; //Wednesday
}break;
case 4 : {
$date_indonesia ='Kamis'; //Thursday
}break;
case 5 : {
$date_indonesia ="Jum'at"; //Friday
}break;
case 6 : {
$date_indonesia ='Sabtu'; //Saturday
}break;
default: {
$date_indonesia ='UnKnown';
}break;
}
echo $date_indonesia; //this result day : Wednesday -> Rabu - 3
//this wrong, cause now day : Monday -> Minggu - 0
?>
Help me Thank's