mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
요일이름을 기본 언어팩에 추가하고 zdate함수에서 l(소문자L)을 이용시 각 언어에 맞는 요일이름으로 변경하는 기능을 추가. 한국어/영어외에 언어 변경 필요
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4583 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c6dea0358d
commit
2496d51f54
10 changed files with 97 additions and 3 deletions
|
|
@ -318,15 +318,19 @@
|
|||
$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));
|
||||
// 요일, 월을 각 언어에 맞게 변경
|
||||
$unit_week = Context::getLang('unit_week');
|
||||
return str_replace(array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'),$unit_week, $string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue