Свойство | Type | Description | |
---|---|---|---|
$datesReader |
Méthode | Description | |
---|---|---|
format ( mixed $value, |
Formats provided value using optional style properties | |
formatDate ( DateTimeInterface $date, |
Formats date with format string for date defined in CLDR for particular locale. | |
formatDateTime ( DateTimeInterface $dateTime, |
Formats dateTime with format string for date and time defined in CLDR for particular locale. | |
formatDateTimeWithCustomPattern ( DateTimeInterface $dateTime, string $format, |
Returns dateTime formatted by custom format, string provided in parameter. | |
formatTime ( DateTimeInterface $time, |
Formats time with format string for time defined in CLDR for particular locale. | |
injectDatesReader ( |
Méthode | Description | |
---|---|---|
doFormattingForSubpattern ( DateTimeInterface $dateTime, string $subformat, array $localizedLiterals ) : string | Formats date or time element according to the subpattern provided. | |
doFormattingWithParsedFormat ( DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals ) : string | Formats provided dateTime object. | |
padString ( string $string, integer $formatLength ) : string | Pads given string to the specified length with zeros. |
protected doFormattingForSubpattern ( DateTimeInterface $dateTime, string $subformat, array $localizedLiterals ) : string | ||
$dateTime | DateTimeInterface | PHP object representing particular point in time |
$subformat | string | One element of format string (e.g., 'yyyy', 'mm', etc) |
$localizedLiterals | array | Array of date / time literals from CLDR |
Résultat | string | Formatted part of date / time |
protected doFormattingWithParsedFormat ( DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals ) : string | ||
$dateTime | DateTimeInterface | PHP object representing particular point in time |
$parsedFormat | array | An array describing format (as in $parsedFormats property) |
$localizedLiterals | array | An array with literals to use (as in $localizedLiterals property) |
Résultat | string | Formatted date / time |
public format ( mixed $value, |
||
$value | mixed | Formatter-specific variable to format (can be integer, \DateTime, etc) |
$locale | Locale to use | |
$styleProperties | array | Integer-indexed array of formatter-specific style properties (can be empty) |
Résultat | string | String representation of $value provided, or (string)$value |
public formatDate ( DateTimeInterface $date, |
||
$date | DateTimeInterface | PHP object representing particular point in time |
$locale | ||
$formatLength | string | One of DatesReader FORMAT_LENGTH constants |
Résultat | string | Formatted date |
public formatDateTime ( DateTimeInterface $dateTime, |
||
$dateTime | DateTimeInterface | PHP object representing particular point in time |
$locale | ||
$formatLength | string | One of DatesReader FORMAT_LENGTH constants |
Résultat | string | Formatted date and time |
public formatDateTimeWithCustomPattern ( DateTimeInterface $dateTime, string $format, |
||
$dateTime | DateTimeInterface | PHP object representing particular point in time |
$format | string | Format string |
$locale | A locale used for finding literals array | |
Résultat | string | Formatted date / time. Unimplemented subformats in format string will be silently ignored |
public formatTime ( DateTimeInterface $time, |
||
$time | DateTimeInterface | PHP object representing particular point in time |
$locale | ||
$formatLength | string | One of DatesReader FORMAT_LENGTH constants |
Résultat | string | Formatted time |
public injectDatesReader ( |
||
$datesReader | ||
Résultat | void |