mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 03:52:15 +09:00
zdate()함수의 언어에 따라 날짜포맷을 강제변경하는 것을, 자동변환을 선택할 수 있도록 수정.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4077 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7cb05f6301
commit
ebfa5ee64c
1 changed files with 10 additions and 8 deletions
|
|
@ -266,11 +266,12 @@
|
||||||
* @param format php date()함수의 시간 포맷
|
* @param format php date()함수의 시간 포맷
|
||||||
* @return string
|
* @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
|
// 대상 시간이 없으면 null return
|
||||||
if(!$str) return;
|
if(!$str) return;
|
||||||
|
|
||||||
// 언어권에 따라서 지정된 날짜 포맷을 변경
|
// 언어권에 따라서 지정된 날짜 포맷을 변경
|
||||||
|
if($conversion == true) {
|
||||||
switch(Context::getLangType()) {
|
switch(Context::getLangType()) {
|
||||||
case "en" :
|
case "en" :
|
||||||
case "es" :
|
case "es" :
|
||||||
|
|
@ -280,6 +281,7 @@
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 년도가 1970년 이전이면 별도 처리
|
// 년도가 1970년 이전이면 별도 처리
|
||||||
if((int)substr($str,0,4) < 1970) {
|
if((int)substr($str,0,4) < 1970) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue