zdate()함수의 언어에 따라 날짜포맷을 강제변경하는 것을, 자동변환을 선택할 수 있도록 수정.

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4077 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
bnu 2008-04-07 07:45:04 +00:00
parent 7cb05f6301
commit ebfa5ee64c

View file

@ -266,11 +266,12 @@
* @param format php date()함수의 시간 포맷
* @return string
**/
function zdate($str, $format = "Y-m-d H:i:s") {
function zdate($str, $format = "Y-m-d H:i:s", $conversion=true) {
// 대상 시간이 없으면 null return
if(!$str) return;
// 언어권에 따라서 지정된 날짜 포맷을 변경
if($conversion == true) {
switch(Context::getLangType()) {
case "en" :
case "es" :
@ -280,6 +281,7 @@
break;
}
}
// 년도가 1970년 이전이면 별도 처리
if((int)substr($str,0,4) < 1970) {