Abe Tobing

Web developer, local musician and a beer lover

Error message

Notice: Undefined property: stdClass::$new in include() (line 87 of /home/abe/abetobing.com_d7/sites/all/themes/brightwhite/comment.tpl.php).

Add new comment

Franky's picture

Alternatif, fungsi yg sama, tetapi dengan format strftime() dan menggunakan native language dari OS untuk translate bahasa
tanpa menggunakan preg_replace, mungkin kurang lebih begini:
 
<?php
function indonesian_date($timestamp = 0, $format = "%A, %d %B %Y %H:%M")
{
    if(!$timestamp) $timestamp = time();
    setlocale(LC_TIME, (strtolower(substr(PHP_OS, 0, 3)) == "win") ? "Indonesian_indonesia.1252" : "id_ID.UTF-8");
    return strftime($format, $timestamp);
}
?>

Thanks for your visit :)