class StubIntlDateFormatter extends IntlDateFormatter
Alias of {@link \Symfony\Component\Intl\DateFormatter\IntlDateFormatter}.
Constants
| NONE |
|
| FULL |
|
| LONG |
|
| MEDIUM |
|
| SHORT |
|
| TRADITIONAL |
|
| GREGORIAN |
|
Methods
|
__construct(string $locale, int $datetype, int $timetype, string $timezone = null, int $calendar = self::GREGORIAN, string $pattern = null)
Constructor |
from IntlDateFormatter | |
| static IntlDateFormatter |
create(string $locale, int $datetype, int $timetype, string $timezone = null, int $calendar = self::GREGORIAN, string $pattern = null)
Static constructor |
from IntlDateFormatter |
| string|Boolean |
format(integer|DateTime $timestamp)
Format the date/time value (timestamp) as a string |
from IntlDateFormatter |
| string |
formatObject(object $object, mixed $format = null, string $locale = null)
Not supported. |
from IntlDateFormatter |
| int |
getCalendar()
Returns the formatter's calendar |
from IntlDateFormatter |
| object |
getCalendarObject()
Not supported. |
from IntlDateFormatter |
| int |
getDateType()
Returns the formatter's datetype |
from IntlDateFormatter |
| int |
getErrorCode()
Returns formatter's last error code. |
from IntlDateFormatter |
| string |
getErrorMessage()
Returns formatter's last error message. |
from IntlDateFormatter |
| string |
getLocale(int $type = Locale::ACTUAL_LOCALE)
Returns the formatter's locale |
from IntlDateFormatter |
| string |
getPattern()
Returns the formatter's pattern |
from IntlDateFormatter |
| string |
getTimeType()
Returns the formatter's time type |
from IntlDateFormatter |
| string |
getTimeZoneId()
Returns the formatter's timezone identifier |
from IntlDateFormatter |
| mixed |
getTimeZone()
Not supported. |
from IntlDateFormatter |
| Boolean |
isLenient()
Returns whether the formatter is lenient |
from IntlDateFormatter |
| string |
localtime(string $value, int $position)
Not supported. |
from IntlDateFormatter |
| string |
parse(string $value, int $position = null)
Parse string to a timestamp value |
from IntlDateFormatter |
| Boolean |
setCalendar(string $calendar)
Not supported. |
from IntlDateFormatter |
| Boolean |
setLenient(Boolean $lenient)
Set the leniency of the parser |
from IntlDateFormatter |
| Boolean |
setPattern(string $pattern)
Set the formatter's pattern |
from IntlDateFormatter |
| Boolean |
setTimeZoneId(string $timeZoneId)
Set the formatter's timezone identifier |
from IntlDateFormatter |
| Boolean |
setTimeZone(mixed $timeZone)
This method was added in PHP 5.5 as replacement for `setTimeZoneId()` |
from IntlDateFormatter |
Details
in IntlDateFormatter at line 146
public
__construct(string $locale, int $datetype, int $timetype, string $timezone = null, int $calendar = self::GREGORIAN, string $pattern = null)
Constructor
in IntlDateFormatter at line 182
static public IntlDateFormatter
create(string $locale, int $datetype, int $timetype, string $timezone = null, int $calendar = self::GREGORIAN, string $pattern = null)
Static constructor
in IntlDateFormatter at line 199
public string|Boolean
format(integer|DateTime $timestamp)
Format the date/time value (timestamp) as a string
in IntlDateFormatter at line 258
public string
formatObject(object $object, mixed $format = null, string $locale = null)
Not supported.
Formats an object
in IntlDateFormatter at line 271
public int
getCalendar()
Returns the formatter's calendar
in IntlDateFormatter at line 285
public object
getCalendarObject()
Not supported.
Returns the formatter's calendar object
in IntlDateFormatter at line 297
public int
getDateType()
Returns the formatter's datetype
in IntlDateFormatter at line 309
public int
getErrorCode()
Returns formatter's last error code.
Always returns the U_ZERO_ERROR class constant value
in IntlDateFormatter at line 321
public string
getErrorMessage()
Returns formatter's last error message.
Always returns the U_ZERO_ERROR_MESSAGE class constant value
in IntlDateFormatter at line 336
public string
getLocale(int $type = Locale::ACTUAL_LOCALE)
Returns the formatter's locale
in IntlDateFormatter at line 348
public string
getPattern()
Returns the formatter's pattern
in IntlDateFormatter at line 360
public string
getTimeType()
Returns the formatter's time type
in IntlDateFormatter at line 372
public string
getTimeZoneId()
Returns the formatter's timezone identifier
in IntlDateFormatter at line 395
public mixed
getTimeZone()
Not supported.
Returns the formatter's timezone
in IntlDateFormatter at line 409
public Boolean
isLenient()
Returns whether the formatter is lenient
in IntlDateFormatter at line 429
public string
localtime(string $value, int $position)
Not supported.
Parse string to a field-based time value
in IntlDateFormatter at line 449
public string
parse(string $value, int $position = null)
Parse string to a timestamp value
in IntlDateFormatter at line 479
public Boolean
setCalendar(string $calendar)
Not supported.
Set the formatter's calendar
in IntlDateFormatter at line 501
public Boolean
setLenient(Boolean $lenient)
Set the leniency of the parser
Define if the parser is strict or lenient in interpreting inputs that do not match the pattern
exactly. Enabling lenient parsing allows the parser to accept otherwise flawed date or time
patterns, parsing as much as possible to obtain a value. Extra space, unrecognized tokens, or
invalid values ("February 30th") are not accepted.
in IntlDateFormatter at line 520
public Boolean
setPattern(string $pattern)
Set the formatter's pattern
in IntlDateFormatter at line 542
public Boolean
setTimeZoneId(string $timeZoneId)
Set the formatter's timezone identifier
in IntlDateFormatter at line 591
public Boolean
setTimeZone(mixed $timeZone)
This method was added in PHP 5.5 as replacement for `setTimeZoneId()`