|
update : 2015.11.03
php.shukuma.com검색:
|
IntlDateFormatter::formatObjectdatefmt_format_object(PHP 5 >= 5.5.0, PECL intl >= 3.0.0) IntlDateFormatter::formatObject -- datefmt_format_object — Formats an object 설명객체 기반 형식
public static string IntlDateFormatter::formatObject
( object
$object
[, mixed $format = NULL
[, string $locale = NULL
]] )절차식 형식
public static
string datefmt_format_object
( object
$object
[, mixed $format = NULL
[, string $locale = NULL
]] )This function allows formatting an IntlCalendar or DateTime object without first explicitly creating a IntlDateFormatter object. The temporary IntlDateFormatter that will be created will take the timezone from the passed in object. The timezone database bundled with PHP will not be used – ICU's will be used instead. The timezone identifier used in DateTime objects must therefore also exist in ICU's database. 인수
반환값
A string with result실패 시 예제
Example #1 IntlDateFormatter::formatObject() examples
<?php위 예제의 출력:
default:
6 juin 2013 17:05:06
long $format (full):
jeudi 6 juin 2013 17:05:06 heure d’été irlandaise
array $format (none, full):
17:05:06 heure d’été irlandaise
string $format (d 'of' MMMM y):
6 of June 2013
with DateTime:
lunes, 9 de septiembre de 2013 09:09:09 Hora de verano de Europa central
|