php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
IntlDateFormatter Class Reference

Public Member Functions

 __construct (?string $locale, int $dateType=IntlDateFormatter::FULL, int $timeType=IntlDateFormatter::FULL, $timezone=null, $calendar=null, ?string $pattern=null)
 
 getDateType ()
 
 getTimeType ()
 
 getCalendar ()
 
 setCalendar (IntlCalendar|int|null $calendar)
 
 getTimeZoneId ()
 
 getCalendarObject ()
 
 getTimeZone ()
 
 setTimeZone ($timezone)
 
 setPattern (string $pattern)
 
 getPattern ()
 
 getLocale (int $type=ULOC_ACTUAL_LOCALE)
 
 setLenient (bool $lenient)
 
 isLenient ()
 
 format ($datetime)
 
 parse (string $string, &$offset=null)
 
 parseToCalendar (string $string, &$offset=null)
 
 localtime (string $string, &$offset=null)
 
 getErrorCode ()
 
 getErrorMessage ()
 

Static Public Member Functions

static create (?string $locale, int $dateType=IntlDateFormatter::FULL, int $timeType=IntlDateFormatter::FULL, $timezone=null, IntlCalendar|int|null $calendar=null, ?string $pattern=null)
 
static formatObject ($datetime, $format=null, ?string $locale=null)
 

Data Fields

const int FULL = UNKNOWN
 
const int LONG = UNKNOWN
 
const int MEDIUM = UNKNOWN
 
const int SHORT = UNKNOWN
 
const int NONE = UNKNOWN
 
const int RELATIVE_FULL = UNKNOWN
 
const int RELATIVE_LONG = UNKNOWN
 
const int RELATIVE_MEDIUM = UNKNOWN
 
const int RELATIVE_SHORT = UNKNOWN
 
const int PATTERN = UNKNOWN
 
const int GREGORIAN = UNKNOWN
 
const int TRADITIONAL = UNKNOWN
 

Detailed Description

@generate-class-entries @not-serializable

Definition at line 6 of file dateformat.stub.php.

Constructor & Destructor Documentation

◆ __construct()

IntlDateFormatter::__construct ( ?string $locale,
int $dateType = IntlDateFormatter::FULL,
int $timeType = IntlDateFormatter::FULL,
$timezone = null,
$calendar = null,
?string $pattern = null )
Parameters
IntlTimeZone | DateTimeZone | string | null$timezone
IntlCalendar | int | null$calendar

Definition at line 38 of file dateformat.stub.php.

Member Function Documentation

◆ create()

static IntlDateFormatter::create ( ?string $locale,
int $dateType = IntlDateFormatter::FULL,
int $timeType = IntlDateFormatter::FULL,
$timezone = null,
IntlCalendar|int|null $calendar = null,
?string $pattern = null )
static
Parameters
IntlTimeZone | DateTimeZone | string | null$timezone@tentative-return-type @alias datefmt_create

Definition at line 52 of file dateformat.stub.php.

◆ format()

IntlDateFormatter::format ( $datetime)
Parameters
IntlCalendar | DateTimeInterface | array | string | int | float$datetime@tentative-return-type @alias datefmt_format

Definition at line 145 of file dateformat.stub.php.

◆ formatObject()

static IntlDateFormatter::formatObject ( $datetime,
$format = null,
?string $locale = null )
static
Parameters
IntlCalendar | DateTimeInterface$datetime
array | int | string | null$format@tentative-return-type @alias datefmt_format_object

Definition at line 153 of file dateformat.stub.php.

◆ getCalendar()

IntlDateFormatter::getCalendar ( )

@tentative-return-type @alias datefmt_get_calendar

Definition at line 77 of file dateformat.stub.php.

◆ getCalendarObject()

IntlDateFormatter::getCalendarObject ( )

@tentative-return-type @alias datefmt_get_calendar_object

Definition at line 95 of file dateformat.stub.php.

◆ getDateType()

IntlDateFormatter::getDateType ( )

@tentative-return-type @alias datefmt_get_datetype

Definition at line 65 of file dateformat.stub.php.

◆ getErrorCode()

IntlDateFormatter::getErrorCode ( )

@tentative-return-type @alias datefmt_get_error_code

Definition at line 179 of file dateformat.stub.php.

◆ getErrorMessage()

IntlDateFormatter::getErrorMessage ( )

@tentative-return-type @alias datefmt_get_error_message

Definition at line 185 of file dateformat.stub.php.

◆ getLocale()

IntlDateFormatter::getLocale ( int $type = ULOC_ACTUAL_LOCALE)

@tentative-return-type @alias datefmt_get_locale

Definition at line 126 of file dateformat.stub.php.

◆ getPattern()

IntlDateFormatter::getPattern ( )

@tentative-return-type @alias datefmt_get_pattern

Definition at line 120 of file dateformat.stub.php.

◆ getTimeType()

IntlDateFormatter::getTimeType ( )

@tentative-return-type @alias datefmt_get_timetype

Definition at line 71 of file dateformat.stub.php.

◆ getTimeZone()

IntlDateFormatter::getTimeZone ( )

@tentative-return-type @alias datefmt_get_timezone

Definition at line 101 of file dateformat.stub.php.

◆ getTimeZoneId()

IntlDateFormatter::getTimeZoneId ( )

@tentative-return-type @alias datefmt_get_timezone_id

Definition at line 89 of file dateformat.stub.php.

◆ isLenient()

IntlDateFormatter::isLenient ( )

@tentative-return-type @alias datefmt_is_lenient

Definition at line 138 of file dateformat.stub.php.

◆ localtime()

IntlDateFormatter::localtime ( string $string,
& $offset = null )
Parameters
int$offset
Returns
array<string, int>|false @tentative-return-type @alias datefmt_localtime

Definition at line 173 of file dateformat.stub.php.

◆ parse()

IntlDateFormatter::parse ( string $string,
& $offset = null )
Parameters
int$offset@tentative-return-type @alias datefmt_parse

Definition at line 160 of file dateformat.stub.php.

◆ parseToCalendar()

IntlDateFormatter::parseToCalendar ( string $string,
& $offset = null )
Parameters
int$offset

Definition at line 165 of file dateformat.stub.php.

◆ setCalendar()

IntlDateFormatter::setCalendar ( IntlCalendar|int|null $calendar)

@tentative-return-type @alias datefmt_set_calendar

Definition at line 83 of file dateformat.stub.php.

◆ setLenient()

IntlDateFormatter::setLenient ( bool $lenient)

@tentative-return-type @alias datefmt_set_lenient

Definition at line 132 of file dateformat.stub.php.

◆ setPattern()

IntlDateFormatter::setPattern ( string $pattern)

@tentative-return-type @alias datefmt_set_pattern

Definition at line 114 of file dateformat.stub.php.

◆ setTimeZone()

IntlDateFormatter::setTimeZone ( $timezone)
Parameters
IntlTimeZone | DateTimeZone | string | null$timezone@tentative-return-type @alias datefmt_set_timezone

Definition at line 108 of file dateformat.stub.php.

Field Documentation

◆ FULL

const int IntlDateFormatter::FULL = UNKNOWN

@cvalue UDAT_FULL

Definition at line 9 of file dateformat.stub.php.

◆ GREGORIAN

const int IntlDateFormatter::GREGORIAN = UNKNOWN

@cvalue UCAL_GREGORIAN

Definition at line 30 of file dateformat.stub.php.

◆ LONG

const int IntlDateFormatter::LONG = UNKNOWN

@cvalue UDAT_LONG

Definition at line 11 of file dateformat.stub.php.

◆ MEDIUM

const int IntlDateFormatter::MEDIUM = UNKNOWN

@cvalue UDAT_MEDIUM

Definition at line 13 of file dateformat.stub.php.

◆ NONE

const int IntlDateFormatter::NONE = UNKNOWN

@cvalue UDAT_NONE

Definition at line 17 of file dateformat.stub.php.

◆ PATTERN

const int IntlDateFormatter::PATTERN = UNKNOWN

@cvalue UDAT_PATTERN

Definition at line 27 of file dateformat.stub.php.

◆ RELATIVE_FULL

const int IntlDateFormatter::RELATIVE_FULL = UNKNOWN

@cvalue UDAT_FULL_RELATIVE

Definition at line 19 of file dateformat.stub.php.

◆ RELATIVE_LONG

const int IntlDateFormatter::RELATIVE_LONG = UNKNOWN

@cvalue UDAT_LONG_RELATIVE

Definition at line 21 of file dateformat.stub.php.

◆ RELATIVE_MEDIUM

const int IntlDateFormatter::RELATIVE_MEDIUM = UNKNOWN

@cvalue UDAT_MEDIUM_RELATIVE

Definition at line 23 of file dateformat.stub.php.

◆ RELATIVE_SHORT

const int IntlDateFormatter::RELATIVE_SHORT = UNKNOWN

@cvalue UDAT_SHORT_RELATIVE

Definition at line 25 of file dateformat.stub.php.

◆ SHORT

const int IntlDateFormatter::SHORT = UNKNOWN

@cvalue UDAT_SHORT

Definition at line 15 of file dateformat.stub.php.

◆ TRADITIONAL

const int IntlDateFormatter::TRADITIONAL = UNKNOWN

@cvalue UCAL_TRADITIONAL

Definition at line 32 of file dateformat.stub.php.


The documentation for this class was generated from the following file: