mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
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:
parent
617eebc0a4
commit
a314ce771d
1 changed files with 10 additions and 9 deletions
|
|
@ -297,13 +297,9 @@
|
||||||
// 대상 시간이 없으면 null return
|
// 대상 시간이 없으면 null return
|
||||||
if(!$str) return;
|
if(!$str) return;
|
||||||
|
|
||||||
$hour = (int)substr($str,8,2);
|
|
||||||
|
|
||||||
// 언어권에 따라서 지정된 날짜 포맷을 변경
|
// 언어권에 따라서 지정된 날짜 포맷을 변경
|
||||||
if($conversion == true) {
|
if($conversion == true) {
|
||||||
switch(Context::getLangType()) {
|
switch(Context::getLangType()) {
|
||||||
case 'ko' :
|
|
||||||
$format = str_replace('a',($hour<=12)?'오전':'오후',$format);
|
|
||||||
case 'en' :
|
case 'en' :
|
||||||
case 'es' :
|
case 'es' :
|
||||||
if($format == 'Y-m-d') $format = 'M d, Y';
|
if($format == 'Y-m-d') $format = 'M d, Y';
|
||||||
|
|
@ -314,8 +310,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 년도가 1970년 이전이면 별도 처리
|
// 년도가 1970년 이전이면 별도 처리
|
||||||
if((int)substr($str,0,4) < 1970) {
|
if((int)substr($str,0,4) < 1970) {
|
||||||
$hour = (int)substr($str,8,2);
|
$hour = (int)substr($str,8,2);
|
||||||
|
|
@ -324,15 +318,22 @@
|
||||||
$year = (int)substr($str,0,4);
|
$year = (int)substr($str,0,4);
|
||||||
$month = (int)substr($str,4,2);
|
$month = (int)substr($str,4,2);
|
||||||
$day = (int)substr($str,6,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('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)),
|
array($year,$month,$day,$hour,$hour/12,$min,$sec,($hour <= 12) ? 'am' : 'pm',getMonthName($month), getMonthName($month,false)),
|
||||||
$format
|
$format
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
// 1970년 이후라면 ztime()함수로 unixtime을 구하고 date함수로 처리
|
||||||
|
$string = date($format, ztime($str));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1970년 이후라면 ztime()함수로 unixtime을 구하고 date함수로 처리
|
// 요일, am/pm을 각 언어에 맞게 변경
|
||||||
return date($format, ztime($str));
|
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue