dmd
Član broj: 37299 Poruke: 192 *.ptt.yu.
|
Ja sam uradio ovu izmenu u verziji 1.0.15 (latinica):
Otvori fajl includes/joomla.php.
Naći funkciju - function mosFormatDate :
/**
* Returns formated date according to current local and adds time offset
* @param string date in datetime format
* @param string format optional format for strftime
* @param offset time offset if different than global one
* @returns formated date
*/
function mosFormatDate( $date, $format="", $offset=NULL ){
global $mosConfig_offset;
if ( $format == '' ) {
// %Y-%m-%d %H:%M:%S
$format = _DATE_FORMAT_LC;
}
if ( is_null($offset) ) {
$offset = $mosConfig_offset;
}
if ( $date && ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})", $date, $regs ) ) {
$date = mktime( $regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1] );
$date = $date > -1 ? strftime( $format, $date + ($offset*60*60) ) : '-';
}
return $date;
}
i zameniti je sa :
function mosFormatDate( $date, $format="", $offset=NULL ){
global $mosConfig_offset;
if ( $format == '' ) {
// %Y-%m-%d %H:%M:%S
$format = _DATE_FORMAT_LC;
}
if ( is_null($offset) ) {
$offset = $mosConfig_offset;
}
if ( $date && ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})", $date, $regs ) ) {
$date = mktime( $regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1] );
$date = $date > -1 ? strftime( $format, $date + ($offset*60*60) ) : '-';
}
$new = explode(",","$date");
// New Day
$Newday = $new[0];
$new = explode(" ","$date");
// New Date
$Newdate = $new[1];
// New Mouth
$Newmounth = $new[2];
$NewYear = $new[3];
//for days in bengali
if($Newday == "Monday")
$Newday = "Ponedeljak";
else if($Newday == "Tuesday")
$Newday = "Utorak";
else if($Newday == "Wednesday")
$Newday = "Sreda";
else if($Newday == "Thursday")
$Newday = "Cetvrtak";
else if($Newday == "Friday")
$Newday = "Petak";
else if($Newday == "Saturday")
$Newday = "Subota";
else if($Newday == "Sunday")
$Newday = "Nedelja";
if($Newmounth == "January")
$Newmounth = "Januar";
else if($Newmounth == "February")
$Newmounth = "Februar";
else if($Newmounth == "March")
$Newmounth = "Mart";
else if($Newmounth == "April")
$Newmounth = "April";
else if($Newmounth == "May")
$Newmounth = "Maj";
else if($Newmounth == "June")
$Newmounth = "Jun";
else if($Newmounth == "July")
$Newmounth = "Jul";
else if($Newmounth == "August")
$Newmounth = "Avgust";
else if($Newmounth == "September")
$Newmounth = "Septembar";
else if($Newmounth == "October")
$Newmounth = "Oktobar";
else if($Newmounth == "November")
$Newmounth = "Novembar";
else if($Newmounth == "December")
$Newmounth = "Decembar";
$date = $Newday.", ".$Newdate." ".$Newmounth." ".$NewYear;
return $date;
}
|