(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
日期格式化程序是一个具体的类,它支持使用模式字符串和/或固定模式对日期进行依赖于区域设置的格式化/分析。此类表示ICU日期格式化功能。它允许用户以本地化格式显示日期,或者使用模式字符串和/或固定模式将字符串解析为PHP日期值。
IntlDateFormatter
{
/* 方法 */
public __construct ( string $locale , int $datetype , int $timetype [, mixed $timezone = NULL [, mixed $calendar = NULL [, string $pattern = "" ]]] )
public static create ( string $locale , int $datetype , int $timetype [, mixed $timezone = NULL [, mixed $calendar = NULL [, string $pattern = "" ]]] ) : IntlDateFormatter
public format ( mixed $value ) : string
public static formatObject ( object $object [, mixed $format = NULL [, string $locale = NULL ]] ) : string
getCalendar ( void ) : int
public getDateType ( void ) : int
public getErrorCode ( void ) : int
public getErrorMessage ( void ) : string
public getLocale ([ int $which ] ) : string
public getPattern ( void ) : string
public getTimeType ( void ) : int
public getTimeZoneId ( void ) : string
public getCalendarObject ( void ) : IntlCalendar
public getTimeZone ( void ) : IntlTimeZone
public isLenient ( void ) : bool
public localtime ( string $value [, int &$position ] ) : array
public parse ( string $value [, int &$position ] ) : int
setCalendar ( mixed $which ) : bool
public setLenient ( bool $lenient ) : bool
public setPattern ( string $pattern ) : bool
public setTimeZoneId ( string $zone ) : bool
public setTimeZone ( mixed $zone ) : bool
}
