helpers\BaseFormatConverter convertDateIcuToPhp()

convertDateIcuToPhp() public static method

Converts a date format pattern from [ICU format][] to [php date() function format][].

The conversion is limited to date patterns that do not use escaped characters. Patterns like d 'of' MMMM yyyy which will result in a date like 1 of December 2014 may not be converted correctly because of the use of escaped characters.

Pattern constructs that are not supported by the PHP format will be removed.

public static string convertDateIcuToPhp ( $pattern, $type = 'date', $locale = null )
$pattern string

Date format pattern in ICU format.

$type string

'date', 'time', or 'datetime'.

$locale string

The locale to use for converting ICU short patterns short, medium, long and full. If not given, Yii::$app->language will be used.

return string

The converted date format pattern.

doc_Yii
2016-10-30 17:04:46
Comments
Leave a Comment

Please login to continue.