config/func.inc.php r4584 rollback

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4603 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-10-06 09:35:06 +00:00
parent 617eebc0a4
commit a314ce771d

View file

@ -297,13 +297,9 @@
// 대상 시간이 없으면 null return
if(!$str) return;
$hour = (int)substr($str,8,2);
// 언어권에 따라서 지정된 날짜 포맷을 변경
if($conversion == true) {
switch(Context::getLangType()) {
case 'ko' :
$format = str_replace('a',($hour<=12)?'오전':'오후',$format);
case 'en' :
case 'es' :
if($format == 'Y-m-d') $format = 'M d, Y';
@ -313,8 +309,6 @@
}
}
// 년도가 1970년 이전이면 별도 처리
if((int)substr($str,0,4) < 1970) {
@ -324,15 +318,22 @@
$year = (int)substr($str,0,4);
$month = (int)substr($str,4,2);
$day = (int)substr($str,6,2);
return str_replace(
$string = str_replace(
array('Y','m','d','H','h','i','s','a','M', 'F'),
array($year,$month,$day,$hour,$hour/12,$min,$sec,($hour <= 12) ? 'am' : 'pm',getMonthName($month), getMonthName($month,false)),
$format
);
} else {
// 1970년 이후라면 ztime()함수로 unixtime을 구하고 date함수로 처리
$string = date($format, ztime($str));
}
// 1970년 이후라면 ztime()함수로 unixtime을 구하고 date함수로 처리
return date($format, ztime($str));
// 요일, am/pm을 각 언어에 맞게 변경
$unit_week = Context::getLang('unit_week');
$unit_meridiem = Context::getLang('unit_meridiem');
$string = str_replace(array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'),$unit_week, $string);
$string = str_replace(array('am','pm','AM','PM'), $unit_meridiem, $string);
return $string;
}
/**